home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / dfnc3714.lha / dfunc_library / docs / dfunc.doc next >
Text File  |  1995-12-14  |  87KB  |  3,375 lines

  1. TABLE OF CONTENTS
  2.  
  3. dfunc.library/DFAllocBitmap
  4. dfunc.library/DFAllocVMem
  5. dfunc.library/DFBeavel
  6. dfunc.library/DFBitmap
  7. dfunc.library/DFBox
  8. dfunc.library/DFCalcArg
  9. dfunc.library/DFCloseXWindow
  10. dfunc.library/DFClrCache
  11. dfunc.library/DFClrPattern
  12. dfunc.library/DFClrPort
  13. dfunc.library/DFClrRast
  14. dfunc.library/DFCompareStr
  15. dfunc.library/DFCopyString
  16. dfunc.library/DFCountGads
  17. dfunc.library/DFDeleteFile
  18. dfunc.library/DFDeltaList
  19. dfunc.library/DFDisable
  20. dfunc.library/DFDosBase
  21. dfunc.library/DFDrawI
  22. dfunc.library/DFEnable
  23. dfunc.library/DFFillWindow
  24. dfunc.library/DFFindID
  25. dfunc.library/DFFindScreen
  26. dfunc.library/DFFindStrLen
  27. dfunc.library/DFFindTask
  28. dfunc.library/DFFindWindow
  29. dfunc.library/DFFreeBitmap
  30. dfunc.library/DFFreeVMem
  31. dfunc.library/DFGetColors
  32. dfunc.library/DFGetFileLength
  33. dfunc.library/DFGetFlags
  34. dfunc.library/DFGetGFont
  35. dfunc.library/DFGetID
  36. dfunc.library/DFGetImage
  37. dfunc.library/DFGetMath
  38. dfunc.library/DFGetProc
  39. dfunc.library/DFGetTitle
  40. dfunc.library/DFGetToggle
  41. dfunc.library/DFGetVMemSize
  42. dfunc.library/DFGhostGads
  43. dfunc.library/DFGraphicsBase
  44. dfunc.library/DFInitScale
  45. dfunc.library/DFIntuitionBase
  46. dfunc.library/DFLine
  47. dfunc.library/DFLoadFile
  48. dfunc.library/DFLoadRGB4
  49. dfunc.library/DFLowerCase
  50. dfunc.library/DFMakeAscii
  51. dfunc.library/DFMakeBool
  52. dfunc.library/DFMakeRastport
  53. dfunc.library/DFNewPrintText
  54. dfunc.library/DFNewProcess
  55. dfunc.library/DFOpenXWindow
  56. dfunc.library/DFPrinterCommand
  57. dfunc.library/DFPrinterText
  58. dfunc.library/DFPrinterWindow
  59. dfunc.library/DFPrintF
  60. dfunc.library/DFPrintText
  61. dfunc.library/DFPrintTxt2
  62. dfunc.library/DFReadArg
  63. dfunc.library/DFRefreshXFrame
  64. dfunc.library/DFRemFile
  65. dfunc.library/DFRemRastport
  66. dfunc.library/DFRemScale
  67. dfunc.library/DFRenameTask
  68. dfunc.library/DFRenderGadgets
  69. dfunc.library/DFReverseBuffer
  70. dfunc.library/DFSaveBuffer
  71. dfunc.library/DFSaveIFF
  72. dfunc.library/DFScaleGads
  73. dfunc.library/DFScreenOfWindow
  74. dfunc.library/DFScreenRastport
  75. dfunc.library/DFSearch
  76. dfunc.library/DFSetBPen
  77. dfunc.library/DFSetColors
  78. dfunc.library/DFSetDrMd
  79. dfunc.library/DFSetFlags
  80. dfunc.library/DFSetFont
  81. dfunc.library/DFSetGFont
  82. dfunc.library/DFSetID
  83. dfunc.library/DFSetImage
  84. dfunc.library/DFSetPattern
  85. dfunc.library/DFSetPen
  86. dfunc.library/DFSetTitle
  87. dfunc.library/DFStripBool
  88. dfunc.library/DFStripText
  89. dfunc.library/DFToggle
  90. dfunc.library/DFUpdateGad
  91. dfunc.library/DFUpperCase
  92. dfunc.library/DFUserPort
  93. dfunc.library/DFViewport
  94. dfunc.library/DFWaitGad
  95. dfunc.library/DFWaitMsg
  96. dfunc.library/DFWindowRastport
  97. dfunc.library/DFWriteStd
  98.  
  99.  
  100. dfunc.library/DFAllocBitmap                       dfunc.library/DFAllocBitmap
  101.  
  102. NAME
  103.     DFAllocBitmap -- Allocate a bitmap structure with bitplanes.
  104.  
  105. SYNOPSIS
  106.  
  107.     bitmap=DFAllocBitmap(width,height,depth)
  108.                          d0    d1     d2:16
  109.  
  110.     struct bitmap *DFAllocBitmap(WORD, WORD, WORD);
  111.  
  112.  
  113. FUNCTION
  114.     This function will try to allocate a bitmap structure. It will also
  115.     initialize the structure with bitplanes and pointers if there is enough
  116.     memory. You will get returned a pointer to this bitmap structure or NULL
  117.     if any failure (low memory).
  118.  
  119. INPUTS
  120.     width  - width of bitplanes
  121.     height - height of bitplanes
  122.     depth  - number of bitplanes (2^depth = number of colors)
  123.  
  124. RESULTS 
  125.     bitmap - pointer to an initialized bitmap structure.
  126.  
  127. SEE ALSO
  128.     DFFreeBitmap()
  129.  
  130.  
  131. dfunc.library/DFAllocVMem                           dfunc.library/DFAllocVMem
  132.  
  133. NAME
  134.     DFAllocVMem -- Allocates a memory buffer with internal structure.
  135.  
  136. SYNOPSIS
  137.  
  138.     buffer=DFAllocVMem(size,type)
  139.                        d0   d1
  140.  
  141.     APTR DFAllocVMem(ULONG, ULONG);
  142.  
  143.  
  144. FUNCTION
  145.     This function will allocate a memory buffer like the
  146.     exec.library/AllocMem() function, but with this function you don't have to
  147.     remember the size of the buffer when freeing the buffer.
  148.  
  149. INPUTS
  150.     size - size of buffer in bytes
  151.     type - requirements (see exec.library/AllocMem() for more information)
  152.  
  153. RESULTS 
  154.     buffer - pointer to an allocated buffer or NULL if any error.
  155.  
  156. SEE ALSO
  157.     DFFreeVMem(), DFGetVMemSize(), exec.library/AllocMem()
  158.  
  159.  
  160. dfunc.library/DFBeavel                                 dfunc.library/DFBeavel
  161.  
  162. NAME
  163.     DFBeavel -- Draws a beaveled box into rastport.
  164.  
  165. SYNOPSIS
  166.  
  167.     DFBeavel(Rastport,left,top,width,height,cols)
  168.              a0       d0   d1  d2    d3:16  d4:8
  169.  
  170.     void DFBeavel(struct rastport *, WORD, WORD, WORD, WORD, UBYTE);
  171.  
  172.  
  173. FUNCTION
  174.     This function will draw a beaveled box into the rastport. Note that the
  175.     width and height values are deltas to the left and top values and not end
  176.     positions. The color field will select the hi-light color and the shadow
  177.     color of the box. The values for each color is 4 bit which you can pick
  178.     from a palette of 16 colors. The first (lower) 4 bits (0-3) is shadow and
  179.     the bits from 4-7 is the hi-light color.
  180.  
  181. INPUTS
  182.     Rastport - pointer to a valid rastport
  183.     left - x start position
  184.     top - y start position
  185.     width - delta to y position (x+width)
  186.     height - delta to y position
  187.     cols - 2x4 bits color value to describe hi-light and shadow colors.
  188.  
  189. SEE ALSO
  190.  
  191.  
  192. dfunc.library/DFBitmap                                 dfunc.library/DFBitmap
  193.  
  194. NAME
  195.     DFBitmap -- Returns a pointer to the bitmap structure of screen.
  196.  
  197. SYNOPSIS
  198.  
  199.     bitmap=DFBitmap(screen)
  200.                     a0
  201.  
  202.     struct bitmap *DFBitmap(struct screen *);
  203.  
  204.  
  205. FUNCTION
  206.     This function will return a pointer to the bitmap structure of the screen.
  207.  
  208. INPUTS
  209.     screen - pointer to a screen
  210.  
  211. RESULTS 
  212.     bitmap - pointer to bitmap of screen
  213.  
  214. SEE ALSO
  215.     DFViewport()
  216.  
  217.  
  218. dfunc.library/DFBox                                       dfunc.library/DFBox
  219.  
  220. NAME
  221.     DFBox -- Draws a filled box in rastport.
  222.  
  223. SYNOPSIS
  224.  
  225.     DFBox(Rastport,x1,y1,x2,y2)
  226.           a0       d0 d1 d2 d3:16
  227.  
  228.     void DFBox(struct rastport *, word, word, word, word);
  229.  
  230.  
  231. FUNCTION
  232.     This function will draw a filled rectangle or box into a valid rastport.
  233.  
  234. INPUTS
  235.     Rastport - pointer to a valid rastport
  236.     x1 - x start position
  237.     y1 - y start position
  238.     x2 - x end position
  239.     y2 - y end position
  240.  
  241. SEE ALSO
  242.  
  243.  
  244. dfunc.library/DFCalcArg                               dfunc.library/DFCalcArg
  245.  
  246. NAME
  247.     DFCalcArg -- Converts a string to a value.
  248.  
  249. SYNOPSIS
  250.  
  251.     value=DFCalcArg(string)
  252.                     a0
  253.  
  254.     WORD *DFCalcArg(STRPTR);
  255.  
  256.  
  257. FUNCTION
  258.     This function will calculate a string into a value. If there are any
  259.     errors in the string the function will return 0 this is of course also
  260.     when the string is a zero value. The string must be null terminated and
  261.     contain no whitespaces. The number can be both decimal and hexadecimal.
  262.  
  263.     This function is very handy when reading single arguments from a argument
  264.     string returned by eg. a dos/cli command.
  265.  
  266. INPUTS
  267.     string - pointer to a number string (hex or dec).
  268.  
  269. RESULTS 
  270.     value - value of string
  271.  
  272. NOTES
  273.     Returns only 16 bit values (currently).
  274.  
  275. EXAMPLE
  276.     Label1:  dc.b  "12678",0   will become Label1 = 12678
  277.     Label2:  dc.b  "$12ff",0   will become Label2 = $12ff
  278.     Label3:  dc.b  "$0023ac",0 will become Label3 = $23ac
  279.     Label4:  dc.b  "hello",0   will become Label4 = 0
  280.  
  281. BUGS
  282.     It should support the 0x.. format and should return 32 bit values.
  283.  
  284. SEE ALSO
  285.     DFReadArg()
  286.  
  287.  
  288. dfunc.library/DFCloseXWindow                     dfunc.library/DFCloseXWindow
  289.  
  290. NAME
  291.     DFCloseXWindow -- Closes a window opened by DFOpenXWindow() [private].
  292.  
  293. SYNOPSIS
  294.  
  295.     DFCloseXWindow(xwindow)
  296.                     a0
  297.  
  298.     void DFCloseXWindow(struct xwindow *);
  299.  
  300.  
  301. FUNCTION
  302.     This function will try to close the window opened with DFOpenXWindow().
  303.     It's important to use this function even though you can use the
  304.     intuition.library/CloseWindow() function. The reason for that is that this
  305.     function will free all memory for the userdata field which the
  306.     CloseWindow() function wount. The machine will not crash, but it will
  307.     fragment your memory.
  308.  
  309. INPUTS
  310.     xwindow - pointer returned by DFOpenXwindow()
  311.  
  312. SEE ALSO
  313.     DFOpenXwindow()
  314.  
  315.  
  316. dfunc.library/DFClrCache                             dfunc.library/DFClrCache
  317.  
  318. NAME
  319.     DFClrCache -- Dummy function for exec.library/DFClearCacheU() (V37+).
  320.  
  321. SYNOPSIS
  322.  
  323.     DFClrCache()
  324.  
  325.  
  326.     void DFClrCache();
  327.  
  328.  
  329. FUNCTION
  330.     This function is a dummy function for exec.library/ClearCacheU(). See
  331.     documentation for that function for more info. Clears the cache.
  332.  
  333. SEE ALSO
  334.     exec.library/ClearCacheU()
  335.  
  336.  
  337. dfunc.library/DFClrPattern                         dfunc.library/DFClrPattern
  338.  
  339. NAME
  340.     DFClrPattern -- This will clear the pattern set by DFSetPattern().
  341.  
  342. SYNOPSIS
  343.  
  344.     DFClrPattern(rastport)
  345.                  a0
  346.  
  347.     void DFClrPattern(struct rastport *);
  348.  
  349.  
  350. FUNCTION
  351.     This function will clear the pattern set by DFSetPattern(). I will make a
  352.     mask with all bits set as a normal rastport is initialized.
  353.  
  354. INPUTS
  355.     rastport - pointer to a rastport
  356.  
  357. SEE ALSO
  358.     DFSetPattern()
  359.  
  360.  
  361. dfunc.library/DFClrPort                               dfunc.library/DFClrPort
  362.  
  363. NAME
  364.     DFClrPort -- removes a link of messages from a message port.
  365.  
  366. SYNOPSIS
  367.  
  368.     DFClrPort(port)
  369.               a0
  370.  
  371.     void DFClrPort(struct msgport *);
  372.  
  373.  
  374. FUNCTION
  375.     This function will remove any link of messages waiting for a GetMsg(). The
  376.     port will be emptied and the messages replied. The user will not get any
  377.     of the messages. This is useful when you wait for a heavy task to finish
  378.     and you can expect the user to have pushed keys and buttons randomly. This
  379.     function will prevent the "button pusher syndrome" kinds of errors.
  380.  
  381. INPUTS
  382.     port - pointer to valid message port structure
  383.  
  384. SEE ALSO
  385.     exec.library/WaitPort(), exec.library/GetMsg(), exec.library/ReplyMsg()
  386.  
  387.  
  388. dfunc.library/DFClrRast                               dfunc.library/DFClrRast
  389.  
  390. NAME
  391.     DFClrRast -- Clears the rastport with b pen.
  392.  
  393. SYNOPSIS
  394.  
  395.     DFClrRast(rastport,yPos,mode)
  396.               a0       d0   d1
  397.  
  398.     void DFClrRast(struct rastport *, WORD, UBYTE);
  399.  
  400.  
  401. FUNCTION
  402.     This function will clear the drawfield of the rastport from y position
  403.     and to the bottom of the rastport with the background pen (set by
  404.     DFSetBPen()). You have to refresh the window frames after this routine
  405.     has returned.
  406.  
  407. INPUTS
  408.     rastport - pointer to a (window) rastport
  409.     yPos - y position to start from (origin top)
  410.     mode - 0 = filled, 1=ghosted
  411.  
  412.  
  413. SEE ALSO
  414.     DFFillWindow(), DFSetBPen()
  415.  
  416.  
  417. dfunc.library/DFCompareStr                         dfunc.library/DFCompareStr
  418.  
  419. NAME
  420.     DFCompareStr -- Compare two strings.
  421.  
  422. SYNOPSIS
  423.  
  424.     success=DFCompareStr(string1,string2,mode)
  425.                          a0      a1      d0
  426.  
  427.     BOOL DFCompareStr(STRPTR, STRPTR, UBYTE);
  428.  
  429.  
  430. FUNCTION
  431.     This function compares two strings. You can compare them partially (mode
  432.    1) or full (mode 0). With mode 0 the strings must be exact alike.
  433.  
  434. INPUTS
  435.     string1 - pointer to a string [0]
  436.     string2 - pointer to a string
  437.     mode - mode 0 = alike
  438.            mode 1 = partially alike
  439.  
  440. RESULTS 
  441.     success - true if alike, else flase
  442.  
  443.  
  444. dfunc.library/DFCopyString                         dfunc.library/DFCopyString
  445.  
  446. NAME
  447.     DFCopyString -- Copy a string to a buffer.
  448.  
  449. SYNOPSIS
  450.  
  451.     DFCopyString(srcStr,destStr)
  452.                  a0     a1
  453.  
  454.     void DFCopyString(STRPTR,APTR);
  455.  
  456.  
  457. FUNCTION
  458.     This function will copy a nullterminated string to a buffer and null
  459.     terminate the buffer.
  460.  
  461. INPUTS
  462.     srcStr - pointer to a null terminated string
  463.     destStr - pointer to destination buffer
  464.  
  465. SEE ALSO
  466.  
  467.  
  468. dfunc.library/DFCountGads                           dfunc.library/DFCountGads
  469.  
  470. NAME
  471.     DFCountGads -- Counts number of gadgets in a gadgetlist.
  472.  
  473. SYNOPSIS
  474.  
  475.     gadgets=DFCountGads(GadList)
  476.                         a0
  477.  
  478.     WORD DFCountGads(struct gadlist *);
  479.  
  480.  
  481. FUNCTION
  482.     This function will count number of gadgets in a gadgetlist.This is useful
  483.     when using the set functions for gadgets to prevent accidental writing to
  484.     illegal memory areas.
  485.  
  486. INPUTS
  487.     GadList - pointer to a gadget list
  488.  
  489. RESULTS 
  490.     gadgets - number of gadgets in list
  491.  
  492. SEE ALSO
  493.  
  494.  
  495. dfunc.library/DFDeleteFile                         dfunc.library/DFDeleteFile
  496.  
  497. NAME
  498.     DFDeleteFile -- Will attempt to delete a file from disk.
  499.  
  500. SYNOPSIS
  501.  
  502.     success=DFDeleteFile(filename)
  503.                          a0
  504.  
  505.     BOOL *DFDeleteFile(STRPTR);
  506.  
  507.  
  508. FUNCTION
  509.     This function will attempt to delete a file from disk.
  510.  
  511. INPUTS
  512.     filename - points to a filename string[0]
  513.  
  514. RESULTS
  515.     success - true if succeed, false if any error
  516.  
  517. NOTES
  518.     See the dos.library/Delete() function for more information.
  519.  
  520. SEE ALSO
  521.     dos.library/Delete()
  522.  
  523.  
  524. dfunc.library/DFDeltaList                           dfunc.library/DFDeltaList
  525.  
  526. NAME
  527.     DFDeltaList -- Will add deltas to all gadget positions in a gadgetlist.
  528.  
  529. SYNOPSIS
  530.  
  531.     DFDeltaList(GadList,x ,y )
  532.                 a0      d0 d1
  533.  
  534.     void DFDeltaList(struct gadlist *, WORD, WORD);
  535.  
  536.  
  537. FUNCTION
  538.     This function will add the x and y deltas to all gadget positions in a
  539.     (dfunc) gadgetlist. This is useful when you make gadgets on the screen
  540.     which should be moved a little. This command saves you lot of work
  541.     altering all the positions in the gadgelist which can sometimes grow very
  542.     big.
  543.  
  544. INPUTS
  545.     GadList - pointer to a gadgetlist of gadget structures (-1 terminated).
  546.     x  - delta x to list (-32K -> +32K)
  547.     y  - delta y to list (-32K -> +32K)
  548.  
  549.  
  550. SEE ALSO
  551.     DFRenderGadgets()
  552.  
  553.  
  554. dfunc.library/DFDisable                               dfunc.library/DFDisable
  555.  
  556. NAME
  557.     DFDisable -- Dummy function for exec.library/Forbid().
  558.  
  559. SYNOPSIS
  560.  
  561.     DFDisable()
  562.  
  563.  
  564.     void DFDisable();
  565.  
  566.  
  567. FUNCTION
  568.     This function is a dummy function for exec.library/Disable(). See the
  569.     documentation for that function for more info. Disable system interrupts.
  570.  
  571. SEE ALSO
  572.     DFEnable(), exec.library/Format()
  573.  
  574.  
  575. dfunc.library/DFDosBase                               dfunc.library/DFDosBase
  576.  
  577. NAME
  578.     DFDosBase -- Returns pointer to dos.library base.
  579.  
  580. SYNOPSIS
  581.  
  582.     dosbase=DFDosBase()
  583.  
  584.  
  585.     struct dosbase *DFDosBase();
  586.  
  587.  
  588. FUNCTION
  589.     This function will return the pointer to the dos.library base. The result
  590.     can be used directly in A6 to call dos functions after this call.
  591.  
  592. RESULTS 
  593.     dosbase - pointer to dos.library base
  594.  
  595. SEE ALSO
  596.     DFIntuitionBase(), DFGraphicsBase()
  597.  
  598.  
  599. dfunc.library/DFDrawI                                   dfunc.library/DFDrawI
  600.  
  601. NAME
  602.     DFDrawI -- Render a image into rastport.
  603.  
  604. SYNOPSIS
  605.  
  606.     DFDrawI(Rastport,Image,x ,y)
  607.             a0       a1    d0 d1:16
  608.  
  609.     void DFDrawI(struct rastport *, struct image *, WORD, WORD);
  610.  
  611.  
  612. FUNCTION
  613.     This function will draw an image into the rastport. The differences
  614.     between this function and the intuition.library's, is that the image does
  615.     not have to be in chipmem with this function. The function will handle
  616.     that process internal and allocate and free a chipmem buffer if needed.
  617.  
  618. INPUTS
  619.     Rastport - pointer to a valid rastport
  620.     Image - pointer to a image structure
  621.     x - delta x
  622.     y - delta y
  623.  
  624. SEE ALSO
  625.     intuition.library/DrawImage()
  626.  
  627.  
  628. dfunc.library/DFEnable                                 dfunc.library/DFEnable
  629.  
  630. NAME
  631.     DFEnable -- Dummy function for exec.library/Permit().
  632.  
  633. SYNOPSIS
  634.  
  635.     DFEnable()
  636.  
  637.  
  638.     void DFEnable();
  639.  
  640.  
  641. FUNCTION
  642.     This function is a dummy function for exec.library/Permit(). See the
  643.     documentation for that function for more info. Enables system interrupts.
  644.  
  645. SEE ALSO
  646.     DFDisable(), exec.library/Permit()
  647.  
  648.  
  649. dfunc.library/DFFillWindow                         dfunc.library/DFFillWindow
  650.  
  651. NAME
  652.     DFFillWindow -- Fills a window with current APen.
  653.  
  654. SYNOPSIS
  655.  
  656.     DFFillWindow(window,mode)
  657.                  a0     d0
  658.  
  659.     void DFFillWindow(struct window, ULONG);
  660.  
  661.  
  662. FUNCTION
  663.     This function will fill a window with the current APen color. The window
  664.     is cleared, filled and then the frames (if any) are redrawn.
  665.  
  666. INPUTS
  667.     window - pointer to a window
  668.     mode   - 0 = solid, 1=ghosted
  669.  
  670. SEE ALSO
  671.     DFSetPen(), graphics.library/SetAPen()
  672.  
  673.  
  674. dfunc.library/DFFindID                                 dfunc.library/DFFindID
  675.  
  676. NAME
  677.     DFFindID -- Returns the gadget number of the gadget with the req. ID.
  678.  
  679. SYNOPSIS
  680.  
  681.     gadgetnumber=DFFindID(GadList,ID)
  682.                           a0      d0
  683.  
  684.     WORD DFFindID(struct gadlist *, LONG);
  685.  
  686.  
  687. FUNCTION
  688.     This function wil return the gadget number of the first gadget found with
  689.     the requested ID. If no gadget has the ID null is returned.
  690.  
  691. INPUTS
  692.     GadList - pointer to list of gadget structures.
  693.     ID - ID of the wanted gadget
  694.  
  695. RESULTS
  696.     gadgetnumber - gadget number in list with the requested ID.
  697.  
  698. NOTES
  699.     ID is not the same as gadget number.
  700.  
  701. SEE ALSO
  702.     DFGetID(), DFSetID()
  703.  
  704.  
  705. dfunc.library/DFFindScreen                         dfunc.library/DFFindScreen
  706.  
  707. NAME
  708.     DFFindScreen -- Find a screen in the screen list by name.
  709.  
  710. SYNOPSIS
  711.  
  712.     screen=DFFindScreen(title)
  713.                         a0
  714.  
  715.     struct screen *DFFindScreen(STRPTR);
  716.  
  717.  
  718. FUNCTION
  719.     This function will search for a screen in the screen list with the name
  720.     [title]. The string must be null terminated. The title can be a part of
  721.     the full title.
  722.  
  723. INPUTS
  724.     title - pointer to a null terminated string.
  725.  
  726. RESULTS 
  727.     screen - pointer to the screen or NULL if not found
  728.  
  729. EXAMPLE
  730.  
  731.     dc.b  "Workb",0
  732.  
  733.     will find
  734.  
  735.     "Workbench screen"
  736.  
  737. SEE ALSO
  738.     DFFindWindow()
  739.  
  740.  
  741. dfunc.library/DFFindStrLen                         dfunc.library/DFFindStrLen
  742.  
  743. NAME
  744.     DFFindStrLen -- Count number of chars in a string.
  745.  
  746. SYNOPSIS
  747.  
  748.     length=DFFindStrLen(string)
  749.                         a0
  750.  
  751.     length DFFindStrLen(STRPTR);
  752.  
  753.  
  754. FUNCTION
  755.     This function will count number of characters in a null terminated string.
  756.  
  757. INPUTS
  758.     string - pointer to a null terminated string
  759.  
  760. RESULTS 
  761.     length - length of string
  762.  
  763. SEE ALSO
  764.     graphics.library/TextLength()
  765.  
  766.  
  767. dfunc.library/DFFindTask                             dfunc.library/DFFindTask
  768.  
  769. NAME
  770.     DFFindTask -- Returns a pointer to a task structure.
  771.  
  772. SYNOPSIS
  773.  
  774.     task=DFFindTask(taskname)
  775.                     a0
  776.  
  777.     structure task *DFFindTask(STRPTR);
  778.  
  779.  
  780. FUNCTION
  781.     This function will try to find the task with the name taskname. To find
  782.     your own task init a0 with zero. If the task could not be found the result
  783.     will be NULL. This is a dummy function for the exec.library/FindTask().
  784.  
  785. INPUTS
  786.     taskname - pointer to a task name.
  787.  
  788. RESULTS 
  789.     task - pointer to a task structure or NULL if taskname is not found.
  790.  
  791. SEE ALSO
  792.     exec.library/FindTask()
  793.  
  794.  
  795. dfunc.library/DFFindWindow                         dfunc.library/DFFindWindow
  796.  
  797. NAME
  798.     DFFindWindow -- Find a window in the window list by name (37.14).
  799.  
  800. SYNOPSIS
  801.  
  802.     window=DFFindWindow(title)
  803.                         a0
  804.  
  805.     struct window *DFFindWindow(STRPTR);
  806.  
  807.  
  808. FUNCTION
  809.     This function will search for a window in the window list with the name
  810.     [title]. The string must be null terminated. The title can be a part of
  811.     the full title.
  812.  
  813. INPUTS
  814.     title - pointer to a null terminated string.
  815.  
  816. RESULTS 
  817.     window - pointer to a window or NULL if not found.
  818.  
  819. SEE ALSO
  820.     DFFindScreen()
  821.  
  822.  
  823. dfunc.library/DFFreeBitmap                         dfunc.library/DFFreeBitmap
  824.  
  825. NAME
  826.     DFFreeBitmap -- Frees a bitmap allocated with DFAllocBitmap().
  827.  
  828. SYNOPSIS
  829.  
  830.     DFFreeBitmap(bitmap)
  831.                   a0
  832.  
  833.     void DFFreeBitmap(struct bitmap *);
  834.  
  835.  
  836. FUNCTION
  837.     This function will free a bitmap which has been allocated with the
  838.     DFAllocBitmap() function. It will free all bitplanes in the structure and
  839.     free the bitmap structure from memory as well.
  840.  
  841. INPUTS
  842.     bitmap - pointer to bimap allocated with DFAllocBitmap()
  843.  
  844.  
  845. NOTES
  846.     DO NOT try to free a bitmap in a screen structure. This will may hang or
  847.     even crash your system. Only use this function with the DFAllocBitmap().
  848.     You CAN use this function to free a bitmap you have set up your self, but
  849.     do this on your own risk!
  850.  
  851. SEE ALSO
  852.     DFAllocBitmap()
  853.  
  854.  
  855. dfunc.library/DFFreeVMem                             dfunc.library/DFFreeVMem
  856.  
  857. NAME
  858.     DFFreeVMem -- Frees a buffer allocated with DFAllocVMem().
  859.  
  860. SYNOPSIS
  861.  
  862.     DFFreeVMem(buffer)
  863.                 a0
  864.  
  865.     void DFFreeVMem(APTR);
  866.  
  867.  
  868. FUNCTION
  869.     This function will free a bufer allocated with DFAllocVMem(). You don't
  870.     need to give the size of the buffer. This is contained internally in the
  871.     allocated buffer.
  872.  
  873. INPUTS
  874.     buffer - pointer to buffer allocated with DFAllocVMem()
  875.  
  876. NOTES
  877.     You can free this memory with exec.library/FreeMem(). If you choose to do
  878.     this you have to recalculate the buffer position and size:
  879.     execBuffer=buffer-4, size = (execBuffer).
  880.  
  881. SEE ALSO
  882.     DFAllocVMem(), DFGetVMemSize(), exec.library/FreeMem()
  883.  
  884.  
  885. dfunc.library/DFGetColors                           dfunc.library/DFGetColors
  886.  
  887. NAME
  888.     DFGetColors -- Gets flags of a gadget in a gadgetlist.
  889.  
  890. SYNOPSIS
  891.  
  892.     ColAttr=DFGetColors(GadList,gad)
  893.                      a0      d0
  894.  
  895.     ULONG DFGetColors(struct GadList, LONG);
  896.  
  897.  
  898. FUNCTION
  899.     This function will return the color attributes of a gadget in a gadgetlist.
  900.  
  901. INPUTS
  902.     GadList - pointer to a gadget list
  903.     gad     - gadget number in list (not same as ID)
  904.  
  905. RESULTS
  906.     ColAttr - color attributes of gadget
  907.  
  908. SEE ALSO
  909.     DFSetColors()
  910.  
  911.  
  912. dfunc.library/DFGetFileLength                   dfunc.library/DFGetFileLength
  913.  
  914. NAME
  915.     DFGetFileLength -- Returns the length of a file.
  916.  
  917. SYNOPSIS
  918.  
  919.     length=DFGetFileLength(filename)
  920.                            a0
  921.  
  922.     ULONG DFGetFileLength(STRPTR);
  923.  
  924.  
  925. FUNCTION
  926.     This function will read the filelength of a file and return it in D0.
  927.     The function (a0) points to a null terminated string which contains the
  928.     filename.
  929.  
  930. INPUTS
  931.     filename - points to filename[0]
  932.  
  933. RESULTS
  934.     length - length of file or NULL if any errors.
  935.  
  936. SEE ALSO
  937.  
  938.  
  939. dfunc.library/DFGetFlags                             dfunc.library/DFGetFlags
  940.  
  941. NAME
  942.     DFGetFlags -- Gets flags of a gadget in a gadgetlist.
  943.  
  944. SYNOPSIS
  945.  
  946.     Flags=DFGetFlags(GadList,gad)
  947.                      a0      d0
  948.  
  949.     ULONG DFGetFlags(struct GadList, LONG);
  950.  
  951.  
  952. FUNCTION
  953.     This function will return the flag attributes of a gadget in a gadgetlist.
  954.  
  955. INPUTS
  956.     GadList - pointer to a gadget list
  957.     gad     - gadget number in list (not same as ID)
  958.  
  959. RESULTS
  960.     flags - flag attributes of gadget
  961.  
  962. SEE ALSO
  963.     DFSetFlags()
  964.  
  965.  
  966. dfunc.library/DFGetGFont                             dfunc.library/DFGetGFont
  967.  
  968. NAME
  969.     DFGetGFont -- Get a pointer to the font attribute gadget is using.
  970.  
  971. SYNOPSIS
  972.  
  973.     FontAttr=DFGetGFont(GadList,gadget)
  974.                         a0      d0:16
  975.  
  976.     struct fontattr *DFGetGFont(struct gadgetlist *, UWORD);
  977.  
  978.  
  979. FUNCTION
  980.     This function returns the pointer to a font attribute the gadget is using
  981.     or null. The TextAttr can be set by using DFSetFont(). The render routine
  982.     will automatically set the font of course, but it can be useful sometimes
  983.     to analyse font activity for gui purposes.
  984.  
  985. INPUTS
  986.     GadList - pointer to a list of gadget structures.
  987.     gadget - gadget number in list
  988.  
  989. RESULTS 
  990.     FontAttr - pointer to a text attr or null
  991.  
  992. SEE ALSO
  993.     DFSetGFont(), DFSetFont()
  994.  
  995.  
  996. dfunc.library/DFGetID                                   dfunc.library/DFGetID
  997.  
  998. NAME
  999.     DFGetID -- Gets the ID of a gadget.
  1000.  
  1001. SYNOPSIS
  1002.  
  1003.     ID=DFGetID(GadList,gadget)
  1004.                a0      d0
  1005.  
  1006.     LONG DFGetID(struct gadlist *;, UWORD);
  1007.  
  1008.  
  1009. FUNCTION
  1010.     This function will return the ID of a gadget or null if no ID found.
  1011.  
  1012. INPUTS
  1013.     GadList - pointer to a list of gadget structures.
  1014.     gadget - gadget number in list
  1015.  
  1016. RESULTS 
  1017.     ID - ID of gadget
  1018.  
  1019. NOTES
  1020.     ID is not the same as gadget number.
  1021.  
  1022. SEE ALSO
  1023.     DFSetID(), DFFindID()
  1024.  
  1025.  
  1026. dfunc.library/DFGetImage                             dfunc.library/DFGetImage
  1027.  
  1028. NAME
  1029.     DFGetImage -- Gets a pointer to a image in a gadget.
  1030.  
  1031. SYNOPSIS
  1032.  
  1033.     image=DFGetImage(GadList,gadget,no)
  1034.                      a0      d0:16  d1:8
  1035.  
  1036.     struct image *DFGetImage(struct gadlist *, UWORD, UBYTE);
  1037.  
  1038.  
  1039. FUNCTION
  1040.     This function will return a pointer to an image structure if gadget has
  1041.     any images. The no defines which of the gadget you want. 0 = upper image,
  1042.     1=lower gadget or -1.
  1043.  
  1044. INPUTS
  1045.     GadList - pointer to a list of gadget structures
  1046.     gadget - gadget number in list
  1047.     no - upper or lower image
  1048.  
  1049. RESULTS 
  1050.     image - pointer to an image structure, null or -1 if not an image
  1051.  
  1052. NOTES
  1053.     Consider -1 to be a valid value when defining no=1. The -1 in the lower
  1054.     field of the gadget tells the render routine to not render any image when
  1055.     pressed. This would else be normal when defining an upper image as with
  1056.     upper texts.
  1057.  
  1058. SEE ALSO
  1059.     DFSetImage()
  1060.  
  1061.  
  1062. dfunc.library/DFGetMath                               dfunc.library/DFGetMath
  1063.  
  1064. NAME
  1065.     DFGetMath -- Gets the FPU decimal name.
  1066.  
  1067. SYNOPSIS
  1068.  
  1069.     fpu=DFGetMath()
  1070.  
  1071.  
  1072.     ULONG DFGetMath();
  1073.  
  1074.  
  1075. FUNCTION
  1076.     This function will return the decimal name of the FPU (Floating Point
  1077.     Unit) on the machine used. The decimal values can be: 0 (no fpu),
  1078.     68040 (FPU040, only on 68040/68060), 68882 and 68881.
  1079.  
  1080. RESULTS 
  1081.     fpu - decimal name on fpu or false if no fpu.
  1082.  
  1083. SEE ALSO
  1084.     DFGetProc()
  1085.  
  1086.  
  1087. dfunc.library/DFGetProc                               dfunc.library/DFGetProc
  1088.  
  1089. NAME
  1090.     DFGetProc -- Returns the processor number.
  1091.  
  1092. SYNOPSIS
  1093.  
  1094.     Processor=DFGetProc()
  1095.  
  1096.  
  1097.     ULONG DFGetProc();
  1098.  
  1099.  
  1100. FUNCTION
  1101.     This function will return the decimal value of the processor the machine
  1102.     is running on. The value can be: 68000, 68010, 68020, 68030, 68040 and
  1103.     68060 (!).
  1104.  
  1105. RESULTS 
  1106.     Processor - decimal value of processor name (680x0).
  1107.  
  1108. SEE ALSO
  1109.     DFGetMath()
  1110.  
  1111.  
  1112. dfunc.library/DFGetTitle                             dfunc.library/DFGetTitle
  1113.  
  1114. NAME
  1115.     DFGetTitle -- Gets the pointer to a string in a gadget.
  1116.  
  1117. SYNOPSIS
  1118.  
  1119.     string=DFGetTitle(GadList,gadget,no)
  1120.                       a0      d0:16  d1:8
  1121.  
  1122.     STRPTR DFGetTitle(struct gadlist *, UWORD, UBYTE);
  1123.  
  1124.  
  1125. FUNCTION
  1126.     This function will return the pointer to a string in gadget or null.
  1127.     Define which text in the gadget you want by setting the no to 0 or 1.
  1128.     1 = the text when gadget is pressed.
  1129.  
  1130. INPUTS
  1131.     GadList - pointer to a list of gadget structures.
  1132.     gadget - gadget number in list
  1133.     no - upper or lower text in gadget
  1134.  
  1135. RESULTS 
  1136.     string - pointer to a null terminated string or null.
  1137.  
  1138. SEE ALSO
  1139.     DFSetTitle()
  1140.  
  1141.  
  1142. dfunc.library/DFGetToggle                           dfunc.library/DFGetToggle
  1143.  
  1144. NAME
  1145.     DFGetToggle -- Get the toggle state of a gadget.
  1146.  
  1147. SYNOPSIS
  1148.  
  1149.     state=DFGetToggle(GadList,gadget)
  1150.                       a0      d0
  1151.  
  1152.     BOOL DFGetToggle(struct gadlist *, UWORD);
  1153.  
  1154.  
  1155. FUNCTION
  1156.     This function will return the toggle state of a gadget. This function
  1157.     will also return a state if you are using the dg_pressed flag for the
  1158.     gadget. This is because the render routine uses this flag to make it look
  1159.     pressed.
  1160.  
  1161. INPUTS
  1162.     GadList - pointer to a gadget list
  1163.     gadget - gadget number in list
  1164.  
  1165. RESULTS 
  1166.     state - false if unpressed else true.
  1167.  
  1168. SEE ALSO
  1169.     DFToggle(), DFRenderGadgets()
  1170.  
  1171.  
  1172. dfunc.library/DFGetVMemSize                       dfunc.library/DFGetVMemSize
  1173.  
  1174. NAME
  1175.     DFGetVMemSize -- Gets the size of a buffer allocated with DFAllocVMem()
  1176.  
  1177. SYNOPSIS
  1178.  
  1179.     size=DFGetVMemSize(buffer)
  1180.                        a0
  1181.  
  1182.     ULONG DFGetVMemSize(APTR);
  1183.  
  1184.  
  1185. FUNCTION
  1186.     This function returns the size of a buffer allocated with DFAllocVMem().
  1187.     It can also be used with the DFLoadFile() function.
  1188.  
  1189. INPUTS
  1190.     buffer - pointer returned by DFAllocVMem()
  1191.  
  1192. RESULTS 
  1193.     size - size of buffer
  1194.  
  1195. NOTES
  1196.     There is no error checking so be sure that the pointer you give to this
  1197.     function is to a buffer allocated with DFAllocVMem() or you may get wild
  1198.     result.
  1199.  
  1200. SEE ALSO
  1201.     DFFreeVMem(), DFAllocVMem(), DFLoadFile()
  1202.  
  1203.  
  1204. dfunc.library/DFGhostGads                           dfunc.library/DFGhostGads
  1205.  
  1206. NAME
  1207.     DFGhostGads -- Sets all gadget in a list to ghost or nonghost mode.
  1208.  
  1209. SYNOPSIS
  1210.  
  1211.     DFGhostGads(gadgets,mode)
  1212.                 a0      d0
  1213.  
  1214.     void DFGhostGads(APTR, UBYTE);
  1215.  
  1216.  
  1217. FUNCTION
  1218.     This function will toggle all gadgets in a gadget list to either ghosted
  1219.     or no-ghosted depended on the mode. Mode 0 means ghost, and mode 1 is
  1220.     no ghosting.
  1221.  
  1222. INPUTS
  1223.     gadgets - pointer to a gadget list
  1224.     mode - 0 = ghost, 1 = no ghosting
  1225.  
  1226. SEE ALSO
  1227.     DFSetFlags(), DFGetFlags()
  1228.  
  1229.  
  1230. dfunc.library/DFGraphicsBase                     dfunc.library/DFGraphicsBase
  1231.  
  1232. NAME
  1233.     DFGraphicsBase -- Returns pointewr to graphics.library base.
  1234.  
  1235. SYNOPSIS
  1236.  
  1237.     gfxbase=DFGraphicsBase()
  1238.  
  1239.  
  1240.     struct graphics *DFGraphicsBase();
  1241.  
  1242.  
  1243. FUNCTION
  1244.     This function returns the pointer to the graphics.library base. The result
  1245.     can be used directly in A6 to call functions from the graphics.library
  1246.     after this call.
  1247.  
  1248. RESULTS 
  1249.     gfxbase - pointer to graphics.library base
  1250.  
  1251. SEE ALSO
  1252.     DFDosBase(), DFIntuitionBase()
  1253.  
  1254.  
  1255. dfunc.library/DFInitScale                           dfunc.library/DFInitScale
  1256.  
  1257. NAME
  1258.     DFInitScale -- Inits a scale for gadgets in a window.
  1259.  
  1260. SYNOPSIS
  1261.  
  1262.     Scale=DFInitScale(Window,GadList)
  1263.                       a0     a1
  1264.  
  1265.     struct Scale *DFInitScale(struct Window *, struct GadList);
  1266.  
  1267.  
  1268. FUNCTION
  1269.     This function will initialize a special structure to use with gadgets if
  1270.     you want to have them scaled when the window resizes.
  1271.  
  1272. INPUTS
  1273.     Window  - pointer to a window
  1274.     GadList - pointer to a gadget list
  1275.  
  1276. RESULTS
  1277.     Scale   - pointer to a private structure or NULL if failure.
  1278.  
  1279. NOTES
  1280.     Do not modify the scale structure in any way. It's private!
  1281.  
  1282. SEE ALSO
  1283.     DFScaleGads(), DFRemScale()
  1284.  
  1285.  
  1286. dfunc.library/DFIntuitionBase                   dfunc.library/DFIntuitionBase
  1287.  
  1288. NAME
  1289.     DFIntuitionBase -- Returns pointer to intuition.library base.
  1290.  
  1291. SYNOPSIS
  1292.  
  1293.     intuitionbase=DFIntuitionBase()
  1294.  
  1295.  
  1296.     struct intuition *DFIntuitionBase();
  1297.  
  1298.  
  1299. FUNCTION
  1300.     This function returns the pointer to the intuition.library base. The
  1301.     result can be used directly in A6 to call functions from the
  1302.     intuition.library after this call.
  1303.  
  1304. RESULTS 
  1305.     intuitionbase - pointer to intuition.library base
  1306.  
  1307. SEE ALSO
  1308.     DFDosBase(), DFGraphicsBase()
  1309.  
  1310.  
  1311. dfunc.library/DFLine                                     dfunc.library/DFLine
  1312.  
  1313. NAME
  1314.     DFLine -- Draws a line in APen color in rastport.
  1315.  
  1316. SYNOPSIS
  1317.  
  1318.     DFLine(rastport,x1,y1,x2,y2)
  1319.            a0       d0 d1 d2 d3:16
  1320.  
  1321.     void DFLine(struct rastport *, WORD, WORD, WORD, WORD);
  1322.  
  1323.  
  1324. FUNCTION
  1325.     This function will draw a line from x1,y1 to x2,y2 in a valid rastport.
  1326.  
  1327. INPUTS
  1328.     rastport - pointer to a valid rastport (preferable a window rasport)
  1329.     x1       - x start position
  1330.     y1       - y start position
  1331.     x2       - x end position
  1332.     y2       - y end position
  1333.  
  1334. SEE ALSO
  1335.  
  1336.  
  1337. dfunc.library/DFLoadFile                             dfunc.library/DFLoadFile
  1338.  
  1339. NAME
  1340.     DFLoadFile -- Will allocate a buffer and load a file into it.
  1341.  
  1342. SYNOPSIS
  1343.  
  1344.     fileptr=DFLoadFile(filename)
  1345.                        a0
  1346.  
  1347.     APTR DFLoadFile(STRPTR);
  1348.  
  1349.  
  1350. FUNCTION
  1351.     This function will allocate a buffer for the file in the same size as the
  1352.     file and then load the content of the file into it. It actual returns the
  1353.     length of the buffer/file in D1.
  1354.  
  1355. INPUTS
  1356.     filename - points to filename string[0]
  1357.  
  1358. RESULTS
  1359.     fileptr - points to beginning of buffer with file in it or NULL if error
  1360.     D1 - returns the length of the file
  1361.  
  1362. NOTES
  1363.     Do not free this memory area with exec.library/FreeMem() or any similar
  1364.     functions. The buffer contains a private structure. Use the DFRemFile()
  1365.     function to remove the file from memory.
  1366.  
  1367. BUGS
  1368.     Function will return filelength, but it is 4 bytes too long!
  1369.  
  1370. SEE ALSO
  1371.     DFRemFile(), DFGetVMemSize()
  1372.  
  1373.  
  1374. dfunc.library/DFLoadRGB4                             dfunc.library/DFLoadRGB4
  1375.  
  1376. NAME
  1377.     DFLoadRGB4 -- Dummy function for graphics.library/LoadRGB4.
  1378.  
  1379. SYNOPSIS
  1380.  
  1381.     DFLoadRGB4(screen,colors,no)
  1382.                a0     a1     d0 
  1383.  
  1384.     void DFLoadRGB4(struct screen *, APTR, UWORD);
  1385.  
  1386.  
  1387. FUNCTION
  1388.     This function sets the colors to a screen in 16 bit format. It's a dummy
  1389.     routine for graphics.library/LoadRGB4() just that here we use screen
  1390.     instead og viewport. Later there will come a function for all color
  1391.     formats and the routine will recode a 16 bit color code to a 32 bit value
  1392.     etc.
  1393.  
  1394. INPUTS
  1395.     screen - pointer to a screen
  1396.     colors - pointer to color values buffer
  1397.     no - number of colors to set
  1398.  
  1399. SEE ALSO
  1400.     graphics.library/LoadRGB4()
  1401.  
  1402.  
  1403. dfunc.library/DFLowerCase                           dfunc.library/DFLowerCase
  1404.  
  1405. NAME
  1406.     DFLowerCase -- Will turn all chars in a buffer to lower case.
  1407.  
  1408. SYNOPSIS
  1409.  
  1410.     DFLowerCase(buffer,size)
  1411.                  a0     d0
  1412.  
  1413.     void DFLowerCase(APTR, ULONG);
  1414.  
  1415.  
  1416. FUNCTION
  1417.     This function will convert all letters in a buffer to lowercase. The
  1418.     routine will also handle foreign chars. like eg. æ, ø, å etc.
  1419.  
  1420. INPUTS
  1421.     buffer - pointer to start address
  1422.     size - size of buffer (can be >=1)
  1423.  
  1424. SEE ALSO
  1425.     DFUpperCase()
  1426.  
  1427.  
  1428. dfunc.library/DFMakeAscii                           dfunc.library/DFMakeAscii
  1429.  
  1430. NAME
  1431.     DFMakeAscii -- Removes all special signs from a buffer.
  1432.  
  1433. SYNOPSIS
  1434.  
  1435.     DFMakeAscii(buffer,size,mode)
  1436.                 a0     d0   d1
  1437.  
  1438.     void DFMakeAscii(APTR, ULONG, UBYTE);
  1439.  
  1440.  
  1441. FUNCTION
  1442.     This function will removes all special signs in a buffer. There are two
  1443.     ways of doing it: 1 - replace the special signs with a point (.) (mode 0),
  1444.     or truncate the buffer and return the new size (mode 1).
  1445.  
  1446. INPUTS
  1447.     buffer - pointer to a buffer
  1448.     size - size of buffer
  1449.     mode - 0 = replace, 1 = truncate
  1450.  
  1451. RESULTS
  1452.     newSize - if mode 1 is set, then newsize of buffer will return in d0.
  1453.  
  1454. SEE ALSO
  1455.  
  1456.  
  1457. dfunc.library/DFMakeBool                             dfunc.library/DFMakeBool
  1458.  
  1459. NAME
  1460.     DFMakeBool -- Will pack to values into a long word.
  1461.  
  1462. SYNOPSIS
  1463.  
  1464.     packet=DFMakeBool(value1,value2)
  1465.                       d0:16  d1:16
  1466.  
  1467.     ULONG DFMakeBool(WORD, WORD);
  1468.  
  1469.  
  1470. FUNCTION
  1471.     This function will pack to words into a longword setting the first value
  1472.     in the high 16 bits and the second value in the 16 lower bits.
  1473.  
  1474. INPUTS
  1475.     value1 - value 1 word size
  1476.     value2 - value 2 word size
  1477.  
  1478. RESULTS 
  1479.     packet - long word containing the two words.
  1480.  
  1481. SEE ALSO
  1482.     DFStripBool()
  1483.  
  1484.  
  1485. dfunc.library/DFMakeRastport                     dfunc.library/DFMakeRastport
  1486.  
  1487. NAME
  1488.     DFMakeRastport -- Allocates a bitmap and inits a rastport in a buffer.
  1489.  
  1490. SYNOPSIS
  1491.  
  1492.     success=DFMakeRastport(buffer,width,height,depth)
  1493.                             a0     d0:16 d1:16  d2:8
  1494.  
  1495.     BOOL DFMakeRastport(APTR, UWORD, UWORD, UBYTE);
  1496.  
  1497.  
  1498. FUNCTION
  1499.     This function will try to allocate a bitmap and init a rastport. It will
  1500.     fail if there are not enough memory.
  1501.  
  1502. INPUTS
  1503.     buffer - pointer to a buffer big enough to keep a rastport structure.
  1504.     width  - width of bitmap
  1505.     height - height of bitmap
  1506.     depth  - depth of bitmap
  1507.  
  1508. RESULTS 
  1509.     rastport - true is success or false if any failure (memory).
  1510.  
  1511. SEE ALSO
  1512.     DFRemRastport(), intuition/rastport.i
  1513.  
  1514.  
  1515. dfunc.library/DFNewPrintText                     dfunc.library/DFNewPrintText
  1516.  
  1517. NAME
  1518.     DFNewPrintText -- Print an ascii text to a window.
  1519.  
  1520. SYNOPSIS
  1521.  
  1522.     DFNewPrintText(window,text,x ,y ,mode)
  1523.                    a0     a1   d0 d1 d2
  1524.  
  1525.     void DFNewPrintText(struct window *, APTR, WORD, WORD, UBYTE);
  1526.  
  1527.  
  1528. FUNCTION
  1529.     This function will print an ascii text buffer in the rastport. The text
  1530.     points to a buffer which contains the whole text terminated with a null.
  1531.     This routine allows linefeeds as well. The mode value tells the routine
  1532.     if the text should be centered or not, null is normal.
  1533.  
  1534. INPUTS
  1535.     window - pointer to a window
  1536.     text - pointer to a null terminated text buffer
  1537.     x  - delta x start
  1538.     y  - delta y start
  1539.     mode - 0 = normal, 1 = center, 2 = right
  1540.  
  1541.  
  1542. NOTES
  1543.     Use this function instead of DFPrintText()!
  1544.  
  1545. BUGS
  1546.     Mode 2 not yet implemented!
  1547.  
  1548.  
  1549. dfunc.library/DFNewProcess                         dfunc.library/DFNewProcess
  1550.  
  1551. NAME
  1552.     DFNewProcess -- Starts code as a new process.
  1553.  
  1554. SYNOPSIS
  1555.  
  1556.     success=DFNewProcess(code,name)
  1557.                          a0   a1
  1558.  
  1559.     BOOL DFNewProcess(APTR, STRPTR);
  1560.  
  1561.  
  1562. FUNCTION
  1563.     This function will try to start a code as a new process. This function is
  1564.     really just a dummy function for the dos.library/NewProcess(). It will
  1565.     init the taglist and parameters for you. For more advanced use you would
  1566.     prefer to use the dos function. This function just intend to make it more
  1567.     simplier for you using the process function.
  1568.  
  1569. INPUTS
  1570.     code - pointer to a valid MC680x0 code.
  1571.     name - pointer to a nullterminated string.
  1572.  
  1573. RESULTS 
  1574.     success - true with success, false if any failure.
  1575.  
  1576. SEE ALSO
  1577.  
  1578.  
  1579. dfunc.library/DFOpenXWindow                       dfunc.library/DFOpenXWindow
  1580.  
  1581. NAME
  1582.     DFOpenXWindow -- Opens a X look-alike window [private].
  1583.  
  1584. SYNOPSIS
  1585.  
  1586.     xwindow=DFOpenXWindow(tags)
  1587.                           a0
  1588.  
  1589.     struct xwindow *DFOpenXWindow(APTR);
  1590.  
  1591.  
  1592. FUNCTION
  1593.     This function will try to open a window which will look like the X
  1594.     windows. The returned pointer is a pointer to a normal window with the
  1595.     userdata field initialized. The structure userdata points to is private.
  1596.  
  1597. INPUTS
  1598.     tags - pointer to normal window tags + x tags.
  1599.  
  1600. RESULTS 
  1601.     xwindow - pointer to a window with userdata.
  1602.  
  1603. NOTE
  1604.     It is important that you have the X window server running. This function
  1605.     will not work properly if not. The server will control the sizing and
  1606.     gadgets for the x window. The server is a seperate binary program which
  1607.     should follow this archive!
  1608.  
  1609. SEE ALSO
  1610.     DFRefreshXFrame(), DFCloseXWindow(),
  1611.     intuition.library/OpenWindowTagList(), intuition/intuition.i
  1612.  
  1613.  
  1614. dfunc.library/DFPrinterCommand                 dfunc.library/DFPrinterCommand
  1615.  
  1616. NAME
  1617.     DFPrinterCommand -- Send a command to the printer.
  1618.  
  1619. SYNOPSIS
  1620.  
  1621.     success=DFPrinterCommand(command)
  1622.                              d0
  1623.  
  1624.     BOOL *DFPrinterCommand(ULONG);
  1625.  
  1626.  
  1627. FUNCTION
  1628.     This function will send a command to the printer. You obtain the command
  1629.     number from the command list. Eg. Command=1 is set Boldface etc.
  1630.  
  1631. INPUTS
  1632.     command - command number (from list).
  1633.  
  1634. RESULTS 
  1635.     success - false if failure else true.
  1636.  
  1637. NOTES
  1638.     The list is a private list and can not be compared to global lists like
  1639.     the ANSI sequence list.
  1640.  
  1641. BUGS
  1642.     Not implemented yet.
  1643.  
  1644. SEE ALSO
  1645.     DFPrinterText(), DFPrinterWindow()
  1646.  
  1647.  
  1648. dfunc.library/DFPrinterText                       dfunc.library/DFPrinterText
  1649.  
  1650. NAME
  1651.     DFPrinterText -- Prints a text to PRT:.
  1652.  
  1653. SYNOPSIS
  1654.  
  1655.     success=DFPrinterText(text)
  1656.                           a0
  1657.  
  1658.     BOOL *DFPrinterText(APTR);
  1659.  
  1660.  
  1661. FUNCTION
  1662.     This function will print a text contaning ascii and ansi sequences (if
  1663.     wanted) to the prt: (printer). The text must be null terminated. It's much
  1664.     like using for example c:type <text> >prt: .
  1665.  
  1666. INPUTS
  1667.     text - pointer to a null terminated text buffer.
  1668.  
  1669. RESULTS 
  1670.     success - false if failure else true.
  1671.  
  1672. SEE ALSO
  1673.     DFPrinterCommand(), DFPrinterWindow()
  1674.  
  1675.  
  1676. dfunc.library/DFPrinterWindow                   dfunc.library/DFPrinterWindow
  1677.  
  1678. NAME
  1679.     DFPrinterWindow -- Prints the rastport of a window.
  1680.  
  1681. SYNOPSIS
  1682.  
  1683.     success=DFPrinterWindow(tags)
  1684.                             a0
  1685.  
  1686.     BOOL *DFPrinterWindow(struct tagitem *);
  1687.  
  1688.  
  1689. FUNCTION
  1690.     This function will try to print portions of the window rastport to the
  1691.     printer. The printer must support graphics. The taglist decide how the
  1692.     area will defined, positive/negative, aspects etc.
  1693.  
  1694. INPUTS
  1695.     tags - pointer to a taglist
  1696.  
  1697. RESULTS 
  1698.     success - false if failure else true.
  1699.  
  1700. NOTES
  1701.     Needs printer.device and a printer which support graphics.
  1702.  
  1703. BUGS
  1704.     Not yet implemented.
  1705.  
  1706. SEE ALSO
  1707.     DFPrinterCommand(), DFPrinterText()
  1708.  
  1709.  
  1710. dfunc.library/DFPrintF                                 dfunc.library/DFPrintF
  1711.  
  1712. NAME
  1713.     DFPrintF -- Formats a string and print it in rastport.
  1714.  
  1715. SYNOPSIS
  1716.  
  1717.     DFPrintF(rastport,string,input,buffer, x, y)
  1718.              a0       a1     a2    a3     d0  d1
  1719.  
  1720.     void DFPrintF(struct rastport *, STRPTR, APTR, APTR, WORD, WORD);
  1721.  
  1722.  
  1723. FUNCTION
  1724.     This function will format the input data into the string and then print it
  1725.     into the rastport at position x and y. The input points to a pointer
  1726.     table. The table consist of as many pointers as there are format signs in
  1727.     the string. Follow the normal exec.library/RawDoFmt() rules. The buffer
  1728.     must be big enough to contain the formatted string.
  1729.  
  1730. INPUTS
  1731.     rastport - pointer to a (window) rastport
  1732.     string - pointer to a null terminated string
  1733.     input - pointer to pointer or value table
  1734.     buffer - pointer to a temp buffer
  1735.     x - x position in rastport
  1736.     y - y position in rastport
  1737.  
  1738.  
  1739. EXAMPLE
  1740.  
  1741.     Here is an example in assembler code:
  1742.  
  1743.     incdir    "includes:"
  1744.     include    "dfunc/dfunc_lib.i"
  1745.     include    "exec/exec_lib.i"
  1746.  
  1747. Start    move.l    a0,-(sp)
  1748.  
  1749.     move.l    $4.w,a6                ;execbase
  1750.     moveq    #37,d0                ;version
  1751.     lea    DFuncName(pc),a1        ;pointer to lib name
  1752.     jsr    _LVOOpenLibrary(a6)        ;open our library
  1753.     move.l    d0,DFuncBase
  1754.     beq.b    .exit
  1755.  
  1756.     move.l    DFuncBase(pc),a6
  1757.  
  1758.     move.l    Rastport(pc),a0
  1759.     lea    String(pc),a1
  1760.     lea    Input(pc),a2
  1761.     lea    Buffer(pc),a3
  1762.     moveq    #0,d0
  1763.     move.w    #140,d1
  1764.     jsr    _LVODFPrintF(a6)
  1765.  
  1766.     move.l    a6,a1
  1767.     move.l    $4.w,a6
  1768.     jsr    _LVOCloseLibrary(a6)
  1769.  
  1770. .exit    move.l    (sp)+,a0
  1771.     moveq    #0,d0
  1772.     rts
  1773.  
  1774. Rastport    dc.l    0
  1775. DFuncBase    dc.l    0
  1776.  
  1777. String        dc.b    "This number: %ld is a %s number indeed!",0
  1778.         even
  1779.  
  1780. Input        dc.l    12000            ;number we will see in string
  1781.         dc.l    Hughtext        ;pointer to text to put in
  1782.  
  1783. HughText    dc.b    "Huge",0        ;the text to put in string
  1784.         even                ;align to even address
  1785.  
  1786. Buffer        dcb.b    128,0            ;buffer is here 128 bytes
  1787.  
  1788. DFuncName    dc.b    "dfunc.library",0
  1789.     ---
  1790.  
  1791. SEE ALSO
  1792.     exec.library/RawDoFmt()
  1793.  
  1794.  
  1795. dfunc.library/DFPrintText                           dfunc.library/DFPrintText
  1796.  
  1797. NAME
  1798.     DFPrintText -- Print an ascii text into rastport (obsolete).
  1799.  
  1800. SYNOPSIS
  1801.  
  1802.     DFPrintText(rastport,text, x, y, mode)
  1803.                  a0       a1   d0 d1  d2:8
  1804.  
  1805.     void DFPrintText(struct rastport *, APTR, WORD, WORD, UBYTE);
  1806.  
  1807.  
  1808. FUNCTION
  1809.     This function will print a ascii text buffer in the rastport. The text
  1810.     points to a buffer which contains the whole text terminated with a null.
  1811.     This routine allows linefeeds as well. The mode value tells the routine if
  1812.     the text should be centered or not, null is normal.
  1813.  
  1814. INPUTS
  1815.     rastport - pointer to a (window) rastport
  1816.     text - pointer to a null terminated text buffer
  1817.     x - horizontal position to print text from
  1818.     y - vertical position (top of text) to print from
  1819.     mode - 0 = normal, 1 = center text with delta x
  1820.  
  1821. NOTES
  1822.     Do not use this function anymore. Use DFNewPrintText() instead.
  1823.  
  1824. SEE ALSO
  1825.     DFPrintTxt2()
  1826.  
  1827.  
  1828. dfunc.library/DFPrintTxt2                           dfunc.library/DFPrintTxt2
  1829.  
  1830. NAME
  1831.     DFPrintTxt2 -- Will print a single string into rastport.
  1832.  
  1833. SYNOPSIS
  1834.  
  1835.     DFPrintTxt2(rastport,text, x, y)
  1836.                 a0       a1   d0 d1
  1837.  
  1838.     void DFPrintTxt2(struct rastport *, STRPTR, WORD, WORD);
  1839.  
  1840.  
  1841. FUNCTION
  1842.     This function will print a null terminated string into the rastport. The x
  1843.     and y values represent the position of the text in the rastport. The
  1844.     routine does not add kernal of the current font to the y value.
  1845.  
  1846. INPUTS
  1847.     rastport - pointer to a (window) rastport
  1848.     text - pointer to a null terminated string
  1849.     x - horizontal start position related to rastport
  1850.     y - vertical start position related to rastport
  1851.  
  1852.  
  1853. SEE ALSO
  1854.     DFPrintText()
  1855.  
  1856.  
  1857. dfunc.library/DFReadArg                               dfunc.library/DFReadArg
  1858.  
  1859. NAME
  1860.     DFReadArg -- Stripps an argument from a argstring and terminates it.
  1861.  
  1862. SYNOPSIS
  1863.  
  1864.     argend=DFReadArg(string,dstBuffer)
  1865.                   a0     a1
  1866.  
  1867.     STRPTR *DFReadArg(STRPTR, APTR);
  1868.  
  1869.  
  1870. FUNCTION
  1871.     This function will parse an argument string and stripp one argument at a
  1872.     time. It will also remove whitespaces from the argument and handles quotes
  1873.     as well (they will also be removed).
  1874.  
  1875. INPUTS
  1876.     string - pointer to a argument string (terminated with null or linefeed).
  1877.     dstBuffer - pointer to the buffer you want the stripped argument. The
  1878.                 argument will be null terminated and contain no quotes.
  1879.  
  1880. RESULTS 
  1881.     arg - points to after argument in argument string. Use this value to get
  1882.           the next arg from the argstring in <string>.
  1883.           It will return NULL if end of argument string.
  1884.  
  1885. SEE ALSO
  1886.     DFCalcArg()
  1887.  
  1888.  
  1889. dfunc.library/DFRefreshXFrame                   dfunc.library/DFRefreshXFrame
  1890.  
  1891. NAME
  1892.     DFRefreshXFrame -- Refreshes the frame of a X window [private].
  1893.  
  1894. SYNOPSIS
  1895.  
  1896.     success=DFRefreshXFrame(xwindow)
  1897.                             a0
  1898.  
  1899.     BOOL DFRefreshXFrame(struct xwindow);
  1900.  
  1901.  
  1902. FUNCTION
  1903.     This function will try to refresh the frame of a X window opended by
  1904.     DFOpenXwindow(). If the pointer doesn't point to a X window the function
  1905.     will return false (null). If the window is not a X window it will take a
  1906.     normal intuition.library/RefreshWindowFrame().
  1907.  
  1908. INPUTS
  1909.     xwindow - pointer to a X window
  1910.  
  1911. RESULTS
  1912.     success - true if x window, false if not a x window
  1913.  
  1914. SEE ALSO
  1915.     DFOpenXwindow(), DFCloseXwindow(), intuition.library/RefreshWindowframe()
  1916.  
  1917.  
  1918. dfunc.library/DFRemFile                               dfunc.library/DFRemFile
  1919.  
  1920. NAME
  1921.     DFRemFile -- Free memory area for loaded file.
  1922.  
  1923. SYNOPSIS
  1924.  
  1925.     DFRemFile(filebuffer)
  1926.               a0
  1927.  
  1928.     void DFRemFile(APTR);
  1929.  
  1930.  
  1931. FUNCTION
  1932.     This function will free any memory allocated with DFLoadFile().
  1933.  
  1934. INPUTS
  1935.     filebuffer - pointer returned by DFLoadFile()
  1936.  
  1937. SEE ALSO
  1938.     DFLoadFile()
  1939.  
  1940.  
  1941. dfunc.library/DFRemRastport                       dfunc.library/DFRemRastport
  1942.  
  1943. NAME
  1944.     DFRemRastport -- Removes a rastport and bitmap init by DFMakeRastport().
  1945.  
  1946. SYNOPSIS
  1947.  
  1948.     DFRemRastport(rastport)
  1949.                    a0
  1950.  
  1951.     void DFRemRastport(struct rastport *);
  1952.  
  1953.  
  1954. FUNCTION
  1955.     This function will remove the rastport made by DFMakeRastport(). It will
  1956.     free any bitplanes in the bitmap and scramble the rastport structure.
  1957.  
  1958. INPUTS
  1959.     rastport - pointer to a rastport buffer init by DFMakeRastport().
  1960.  
  1961.  
  1962. NOTES
  1963.     DO NOT use this function on a rastport allocated by OpenScreen() or
  1964.     similar. It will may hang up your system or crash it.
  1965.  
  1966. SEE ALSO
  1967.     DFMakeRastport()
  1968.  
  1969.  
  1970. dfunc.library/DFRemScale                             dfunc.library/DFRemScale
  1971.  
  1972. NAME
  1973.     RemScale -- Removes a valid scale structure.
  1974.  
  1975. SYNOPSIS
  1976.  
  1977.     RemScale(scale)
  1978.              d0
  1979.  
  1980.     void RemScale(struct scale *);
  1981.  
  1982.  
  1983. FUNCTION
  1984.     This function will remove the allocated scale structure initialized by
  1985.     InitScale().
  1986.  
  1987. INPUTS
  1988.     scale - pointer to a valid scale structure.
  1989.  
  1990. SEE ALSO
  1991.     InitScale()
  1992.  
  1993.  
  1994. dfunc.library/DFRenameTask                         dfunc.library/DFRenameTask
  1995.  
  1996. NAME
  1997.     DFRenameTask -- Renames a task or process.
  1998.  
  1999. SYNOPSIS
  2000.  
  2001.     oldName=DFRenameTask(task,newTask)
  2002.                          a0   a1
  2003.  
  2004.     STRPTR DFRenameTask(structure task *, STRPTR);
  2005.  
  2006.  
  2007. FUNCTION
  2008.     This function will try to rename a task. It will return a pointer to the
  2009.     old name. It's recommended that you set back the old name before you exit.
  2010.  
  2011. INPUTS
  2012.     task - pointer to taskstructure
  2013.     newTask - pointer to a null terminated string with the new task name.
  2014.  
  2015. RESULTS 
  2016.     oldName - pointer to the old name.
  2017.  
  2018. SEE ALSO
  2019.  
  2020.  
  2021. dfunc.library/DFRenderGadgets                   dfunc.library/DFRenderGadgets
  2022.  
  2023. NAME
  2024.     DFRenderGadgets -- render gadget list into rastport.
  2025.  
  2026. SYNOPSIS
  2027.  
  2028.     DFRenderGadgets(Rastport, gadgetList)
  2029.                     a0        a1
  2030.  
  2031.  
  2032.     void DFRenderGadgets(struct Rastport *, APTR);
  2033.  
  2034.  
  2035. FUNCTION
  2036.     This function will render your gadget list into a valid rastport.
  2037.     The gadgetList contains one or more structures in an array with -1
  2038.     to terminate the structure array.
  2039.  
  2040.         dg_Pressed - This flag will make the gadget look pressed all the time.
  2041.             This flag has really no use for the programmer and it is usally
  2042.             used internally by the toggle function in the library to set or
  2043.             unset a gadget. It is also used when a gadget is pressed by
  2044.             mouse or by a hotkey.
  2045.         dg_Inpressable - This flag will make the gadget untouchable. It will
  2046.             thow return the result in D0 and A0 as normal when using WaitMsg()
  2047.             but it will not toggle graphical.
  2048.         dg_Invisable - This gadget will not be rendered, but the hotzone is
  2049.             still active. This mean you can define an area on a picture for
  2050.             instance which will have a hotzone. Useful in multimedia
  2051.             applications. If you use dg_Invisable then the dg_Top, dg_Left,
  2052.             dg_Width and the dg_Height fields do not have to be initialized.
  2053.             The routine will skip rendering the gadget and these fields will
  2054.             not be read. This flag is useful when using muti hotkeys for some
  2055.             functions like exit which can be escape, amiga+q etc. Define one
  2056.             gadget for each of these combinations and your application will be
  2057.             very userfriendly.
  2058.         dg_Ghosted - This will ghost the gadget and make it inpressable. The
  2059.             differences between this flag and the dg_Inpressable flag, are
  2060.             that with this flag the gadget gets a graphic change and you will
  2061.             get no returns with the WaitMsg() function.
  2062.         dg_Inscalable - This flag will not allow the gadget to be rescaled
  2063.             if the window gets resized. The position will be adjusted anyhow.
  2064.             Note that the font will not (at this time) be rescaled, but this
  2065.             will maybe be fixed in future version of the dfunc.library.
  2066.         dg_NoBorder - With this flag set the gadget will be rendered with no
  2067.             highlite and shadow borders. Useful for graphic designs where you
  2068.             can predraw your own borders.
  2069.         dg_NoBack - This make the gadget transperant. The borders will be
  2070.             drawn and the text as well. NOTE: If you use two different texts
  2071.             on the gadget you have to suit for to render the background of the
  2072.             gadget yourself, or use an image which will cover the text area.
  2073.             The gadgets are rendered with Jam0 mode and the texts will mix if
  2074.             you don't suit for background. With one text only this will be no
  2075.             problem.
  2076.         dg_DblBorderV - This will render the gadget with double borders
  2077.             vertically. Useful on hi-res nolace screens. Since we don't use
  2078.             any DisplayInfo for the gadgets we have to initialize the borders
  2079.             our self, but then again we are more flexible to design them the
  2080.             way we want them and that is some of the strength of this library.
  2081.         dg_DblBorderH - This will render the gadget with double borders
  2082.             horizontally. Useful on lo-res interlaced screens.
  2083.         dg_Picture - This flag allows you to use a bitmap or rastport to
  2084.             fill the background of the gadget with. This is at the moment
  2085.             not in use and will have no effect in this version of the
  2086.             dfunc.library. FUTURE expansion (see the dg_Extended flag).
  2087.         dg_Pattern - This flag will allow you to use a image to fill the
  2088.             gadget area (not yet available). FUTURE!
  2089.         dg_TextLeft - This flag will render the text from left + 4 pixels in
  2090.             the gadget. The default for a gadget is center.
  2091.         dg_TextRight - This will render the gadget with text from right
  2092.             border minus 4 pixels.
  2093.         dg_TextShadow - If you want shadow on your text (1 pixel X/Y), you
  2094.             use this flag. The shadow color is the same as the BorderShadow.
  2095.         dg_HotKey - This allow you to use keys to activate the gadgets instead
  2096.             of the mouse. This system uses IDCMP_ValillaKey which will restrict
  2097.             the possibilities a little, but not as much so it will be useless.
  2098.             You can set these hotkeys in the dg_Title1 string:
  2099.  
  2100.             . - No qualifier. This will allow no key combinations with the
  2101.                 main key, just the key following the "." .
  2102.             A - You have to press lalt or ralt with the characterkey. The
  2103.                 result of this combination have to be the same character as
  2104.                 requested. This is for every hotkey states since we're using
  2105.                 IDCMP_VanillaKey.
  2106.             L - Use lAmiga in combination with the key.
  2107.             R - Use rAmiga incombination with the key.
  2108.             S - Use one of the shiftkeys in combination with the key.
  2109.                 Here you usally have to use the dg_Insensitive flag to get
  2110.                 the right vanilla key.
  2111.             C - Use control key in combination with the requested key. This
  2112.                 qualifier will rarely return a keycode simular to the
  2113.                 requested key and therefor this qualifier is of no use.
  2114.             If you setting none of these qualifier flags, you can use any
  2115.             combination you like as long as the result is the same as the
  2116.             requested key.
  2117.  
  2118.            Examples:
  2119.  
  2120.               dc.b   ".sTesting",0
  2121.            This will only allow the s key to activate the gadget. The
  2122.            character "s" in Testing will get an underscore.
  2123.  
  2124.               dc.b   "sTesting",0
  2125.            This will allow any combination with the s as long as the result
  2126.            is a 's'.
  2127.  
  2128.               dc.b   "RiTesting",0
  2129.            Press rAmiga + i to activate the gadget. The "Ri" text will not
  2130.            show in the gadget.
  2131.  
  2132.               dc.b   "SnTesting",0
  2133.            Press Shift + n to activate gadget. To make the shift combination
  2134.            work, you have to use the dg_Insensitive flag.
  2135.  
  2136.               dc.b   "R",134,"Testing",0
  2137.            This will combine the rAmiga with a key producing the ascii code
  2138.            134. This will ofcourse result a underscore for the gadget text,
  2139.            but you can use it to get the key you want.
  2140.  
  2141.         If the hotkey used is found in the main text, you will get an
  2142.         underscore at the gadget.
  2143.         The DFWaitGad() will not "eat" the message even if a hotkey is used
  2144.         which means you can use the message returned for your own use.
  2145.  
  2146.         If you are using the same hotkey in another gadget, the first gadget
  2147.         with the hotkey in the gadList will be activated while the others
  2148.         will be ignored.
  2149.  
  2150.         Since the routine uses IDCMP_VANILLAKEY you cannot use the F1-F10,
  2151.         HELP, arrow keys or qualifiers alone. There will be developed a new
  2152.         routine to check for IDCMP_RawKeys. This routine will be named
  2153.         DFWaitGadR(). This function is currently unavailable!
  2154.  
  2155.         dg_Insensitive - This will uppercase all characters for hotkey use
  2156.             internally allowing the Shift keys to be used as a qualifier.
  2157.             This is necessary because the gadgets are using VanillaKey and
  2158.             not RawKeys. Use the DG_HotKeyS macro for default actions of your
  2159.             gadgets if you want hotkeys.
  2160.         dg_ShadowBottom - This is a design flags exlusive for the dfunc
  2161.             gadgets. This will render the gadgets with a shadow at bottom
  2162.             so it will look like it is more near the user than the rest of
  2163.             the screen. Use it in combination with the dg_ShadowRight and
  2164.             the dg_ShadowCorner flag. When gadget is pressed the shadow
  2165.             is removed with the background pen, so that means you can put
  2166.             these gadgets on any background you like (not pictures etc.) and
  2167.             the shadow look will work alright.
  2168.         dg_ShadowRight - The same as the dg_ShadowBottom flag, but this will
  2169.             draw a shadow at the right side of the gadget.
  2170.         dg_ShadowCorner - This flag is only useful if you are using only one
  2171.             of the above shadow flags. This has a design purpose in mind. If
  2172.             you making a grid of gadgets this is useful to make the gadgets
  2173.             shadow look realistic. Experiment!
  2174.         dg_ImageRight - If you are using images for your gadgets, this flag
  2175.             will make the image appear at the right side of the gadget.
  2176.             Default is left side. You don't have to worry about deltas, cause
  2177.             those will be calculated reversed.
  2178.         dg_ImageCenter - This flag will draw the image in the center of the
  2179.             gadget. Fine adjust using the deltas in the image structure.
  2180.         dg_Extended - This flag will tell the render routine that more flags
  2181.             are applied to the gadget in the dg_Link field. This flag does
  2182.             nothing yet. DO NOT USE THIS FLAG UNTIL NOTICED!
  2183.     dg_Movable - this flag allow you to take action when holding down the
  2184.             mousebutton over the gadget. More information below.
  2185.         dg_Mask - When this flag is set you can use the dg_link field to point
  2186.             to a 2 color image structure. This image can be used as a mask
  2187.             field for the gadget. Pressing at a point which a bit is set will
  2188.             give result, if none bit are set the result will be false as if
  2189.             the gadget where not pressed. The routine will only consider 1
  2190.             bitplane of the image structure. It is recommended that the image
  2191.             is as big as the gadget area.
  2192.  
  2193.  
  2194.         Texts (for dg_Title1 and the dg_Title2 fields):
  2195.  
  2196.         If the textlength gets bigger then the width or height of the gadget
  2197.         it will not be drawn. This not a exclution of the routine, but a side
  2198.         effect of the calculation routine. The text will be drawn in a unknown
  2199.         area of the rastport (don't use screen rastport!). The calculation is
  2200.         done as this so it will get most speed of the computer so it is your
  2201.         responsibility to suit for your text to fit within the gadgets border
  2202.         limits. The render routine are aware of the width on different fonts
  2203.     so don't worry about that.
  2204.  
  2205.         You can define pixel deltas for the text if you want to display it
  2206.         different than calculated. This is how:
  2207.  
  2208.     NOTE: DO NOT USE THIS FACILITY! IT WILL BE CHANGED!
  2209.  
  2210.         dc.b   $A,$-5,"Text",0
  2211.             This will add 10 pixels to the X and -5 pixels to the Y.
  2212.  
  2213.         dc.b   4,"Text",0
  2214.             This will add 4 pixels to the X.
  2215.  
  2216.         dc.b   "Text",0
  2217.             This will do nothing extra.
  2218.  
  2219.         NOTE: If you are using DG_HOTKEY, the hotkey MUST be defined first! :
  2220.  
  2221.         dc.b   ".x",6,7,"Text",0
  2222.  
  2223.         Another thing to remember is that the values have to be less than
  2224.         32 and larger than -128 (the other values are used as text..).
  2225.  
  2226.         For countries who uses "æ", "ø", "å" etc. this will collide. To solve
  2227.         this add a space in front of your text. The special characters are in
  2228.         the position area of the ascii value. This will be fixed later and we
  2229.         recommend you to NOT USE this feature yet! It is currently functional,
  2230.         but we may change the behaviour in the future to able special signs
  2231.         users to get some comfort.
  2232.  
  2233.         Images (the dg_Image1 and dg_Image2 fields):
  2234.  
  2235.         With the dfunc.library you don't have to worry about having your
  2236.         image buffers in chipmem. You can as well have them in FAST/PUBLIC.
  2237.         The routine will find out if chip is needed, make a buffer, copy the
  2238.         image to the chip buffer and then render it. You will not notice any
  2239.         speed delays as long as the images aren't to big. If so make a hunk
  2240.         section for chipmem or allocate a buffer with AllocMem(). This will
  2241.         work with graphics card as well.
  2242.  
  2243.         If you don't want any images appearing in pressed state, use -1 in the
  2244.         dg_Image2 field.
  2245.  
  2246.         CYCLEKIND:
  2247.         Not yet available!
  2248.  
  2249.         PROCESSKIND:
  2250.  
  2251.         Initalize a pointer to your code in the dg_Link field. The code will
  2252.         then be started when the gadget is released active. There is two ways
  2253.         of activating your code. 1: A jump call which is ended with an RTS, or
  2254.         you can start your code as an own process. To take advantage of the
  2255.         last one, use the DG_PROCTASK. If you use this methode the gadget will
  2256.         return control to your program immediatly at the same time as your
  2257.         dg_Link code will be started independent. We will recommend you to
  2258.         control your new task with flags else you'll get a new task everytime
  2259.         you press the Process gadget. The task is named as the text of the
  2260.         dg_Title1 field.
  2261.  
  2262.     MOVABLE:
  2263.  
  2264.     This gadgettype is meant to allow custom handling og the gadget. When
  2265.         this flag is set (DG_MOVABLE) the gadget is released at once when
  2266.         pressing the gadget. This allow you to take custom action on it, for
  2267.         example, move the positions. Combining this flag with the process kind
  2268.         flag can make powerful gadgets. Eg. Workbench emulation to mention
  2269.         something.
  2270.  
  2271.         SLIDERKIND:
  2272.         Not yet available!
  2273.  
  2274.         TEXTKIND:
  2275.         Not yet available!
  2276.  
  2277.         NUMERICKIND:
  2278.         Not yet available!
  2279.  
  2280.  
  2281. INPUTS
  2282.     Rastport   - pointer to a valid (window) rastport
  2283.     gadgetList - pointer to the beginning of a terminated structure list
  2284.  
  2285. RESULTS
  2286.     none
  2287.     
  2288. SEE ALSO
  2289.     DFWaitGad(), DFDeltaList(), DFUpdateGad()
  2290.  
  2291.  
  2292. dfunc.library/DFReverseBuffer                   dfunc.library/DFReverseBuffer
  2293.  
  2294. NAME
  2295.     DFReverseBuffer -- Reverses a buffer.
  2296.  
  2297. SYNOPSIS
  2298.  
  2299.     DFReverseBuffer(buffer,length)
  2300.                     a0     d0
  2301.  
  2302.     void DFReverseBuffer();
  2303.  
  2304.  
  2305. FUNCTION
  2306.     This function will reverse the bytes in a buffer with the alorithm:
  2307.     (pseduo)
  2308.  
  2309.     Byte1(buffer+pos) -> temp
  2310.     Byte2(Buffer+length-pos+1) -> Byte1(buffer+pos)
  2311.     temp -> Byte2(Buffer+length-pos+1)
  2312.     pos=pos+1
  2313.     if pos=int(length/2) then exit
  2314.  
  2315. INPUTS
  2316.     buffer - pointer to a buffer
  2317.     length - length of buffer
  2318.  
  2319. NOTES
  2320.     Length of buffer must be more than 1 byte!
  2321.  
  2322. dfunc.library/DFSaveBuffer                         dfunc.library/DFSaveBuffer
  2323.  
  2324. NAME
  2325.     DFSaveBuffer -- Saves a memory buffer to a file.
  2326.  
  2327. SYNOPSIS
  2328.  
  2329.     success=DFSaveBuffer(filename,buffer,size)
  2330.                          a0       a1     d0
  2331.  
  2332.     BOOL *DFSaveBuffer(STRPTR, APTR, ULONG);
  2333.  
  2334.  
  2335. FUNCTION
  2336.     This function will save a memory buffer to a file. The contents of the
  2337.     buffer not be modified in any way so the file will be a raw file.
  2338.  
  2339. INPUTS
  2340.     filename - points to a filename string[0]
  2341.     buffer - points to start address to save from
  2342.     size - size of buffer to save
  2343.  
  2344. RESULTS
  2345.     success - true if ok, false if any errors
  2346.  
  2347. SEE ALSO
  2348.  
  2349.  
  2350. dfunc.library/DFSaveIFF                               dfunc.library/DFSaveIFF
  2351.  
  2352. NAME
  2353.     DFSaveIFF -- Saves a bitmap as an IFF file.
  2354.  
  2355. SYNOPSIS
  2356.  
  2357.     succeed=DFSaveIFF(Screen,filename,mode)
  2358.                       a0     a1       d0
  2359.  
  2360.     BOOL *DFSaveIFF(struct screen *, STRPTR, ULONG);
  2361.  
  2362.  
  2363. FUNCTION
  2364.     This function will attempt to save a bitmap in the a screen as an IFF ILBM
  2365.     file. Currently it will be uncompressed, but you can load it into an art
  2366.     package and resave it and it will be compressed.
  2367.  
  2368. INPUTS
  2369.     Screen - pointer to a screen
  2370.     filename - pointer to a NULL terminated string containg filename
  2371.     mode - set this to null. Currently only uncompressed pictures are
  2372.            supported. You may use 1 if you want your pictures compressed in
  2373.            the future.
  2374.  
  2375. RESULTS
  2376.     succeed - true if success, false if any error
  2377.  
  2378. SEE ALSO
  2379.     DFLoadIFF() [currently private]
  2380.  
  2381.  
  2382. dfunc.library/DFScaleGads                           dfunc.library/DFScaleGads
  2383.  
  2384. NAME
  2385.     ScaleGads -- Scales a gadget list when called.
  2386.  
  2387. SYNOPSIS
  2388.  
  2389.     ScaleGads(scale)
  2390.               d0
  2391.  
  2392.     void ScaleGads(struct scale *);
  2393.  
  2394.  
  2395. FUNCTION
  2396.     This function is called when you get message about window resize or window
  2397.     zip. It will then scale the gadgets and redraw them into your window.
  2398.  
  2399. INPUTS
  2400.     scale - pointer to a valid scale structure returned by InitScale()
  2401.  
  2402. NOTES
  2403.     The window will be cleared before scaling so you have to suit for your
  2404.     self to redraw any graphics which got nothing to do with the gadgets.
  2405.  
  2406. SEE ALSO
  2407.     InitScale()
  2408.  
  2409.  
  2410. dfunc.library/DFScreenOfWindow                 dfunc.library/DFScreenOfWindow
  2411.  
  2412. NAME
  2413.     DFScreenOfWindow -- Returns a pointer to the screen containing window.
  2414.  
  2415. SYNOPSIS
  2416.  
  2417.     screen=DFScreenOfWindow(window)
  2418.                             a0
  2419.  
  2420.     struct screen *DFScreenOfWindow(struct window *);
  2421.  
  2422.  
  2423. FUNCTION
  2424.     This function returns a pointer to the screen contaning this window.
  2425.  
  2426. INPUTS
  2427.     window - pointer to a window
  2428.  
  2429. RESULTS 
  2430.     screen - pointer to a screen containing window
  2431.  
  2432. SEE ALSO
  2433.     DFUserPort()
  2434.  
  2435. dfunc.library/DFScreenRastport                 dfunc.library/DFScreenRastport
  2436.  
  2437. NAME
  2438.     DFScreenRastport -- Returns the rastport address of a screen.
  2439.  
  2440. SYNOPSIS
  2441.  
  2442.     rastport=DFScreenRastport(Screen)
  2443.                      a0
  2444.  
  2445.     struct rastport *DFWindowRastport(struct screen *);
  2446.  
  2447.  
  2448. FUNCTION
  2449.     This function will return the address to th rastport of the window.
  2450.     It's really a dummy routine.
  2451.  
  2452. INPUTS
  2453.     Screenw - pointer to a screen
  2454.  
  2455. RESULTS
  2456.     rastport - pointer to a rastport structure
  2457.  
  2458. SEE ALSO
  2459.     DFWindowRastport()
  2460.  
  2461.  
  2462. dfunc.library/DFSearch                                 dfunc.library/DFSearch
  2463.  
  2464. NAME
  2465.     DFSearch -- Search for a word in a buffer.
  2466.  
  2467. SYNOPSIS
  2468.  
  2469.     address=DFSearch(buffer,string,bufferSz)
  2470.                      a0     a1     d0
  2471.  
  2472.     APTR DFSearch(APTR, STRPTR, ULONG);
  2473.  
  2474.  
  2475. FUNCTION
  2476.     This function will search for a word in a buffer. The word you specify
  2477.     must be null terminated. The size of the buffer should be bigger than the
  2478.     word length.
  2479.  
  2480. INPUTS
  2481.     buffer - pointer to start address
  2482.     string - pointer to word to search for
  2483.     bufferSz - size of buffer to search in
  2484.  
  2485. RESULTS 
  2486.     address - pointer to the word in buffer or null if not found.
  2487.  
  2488. SEE ALSO
  2489.  
  2490.  
  2491. dfunc.library/DFSetBPen                               dfunc.library/DFSetBPen
  2492.  
  2493. NAME
  2494.     DFSetBPen -- Dummy for graphics.library/SetBPen().
  2495.  
  2496. SYNOPSIS
  2497.  
  2498.     DFSetBPen(rastport,pen)
  2499.               a0       d0
  2500.  
  2501.     void DFSetBPen(struct rastport *, UBYTE);
  2502.  
  2503.  
  2504. FUNCTION
  2505.     This function is a dummy function for graphics.library/SetBPen().
  2506.     It sets the background color for text etc. in the rastport.
  2507.  
  2508. INPUTS
  2509.     rastport - pointer to a (window) rastport
  2510.     pen - pen number (palette number)
  2511.  
  2512. SEE ALSO
  2513.     DFSetPen(), graphics.library/SetBPen()
  2514.  
  2515.  
  2516. dfunc.library/DFSetColors                           dfunc.library/DFSetColors
  2517.  
  2518. NAME
  2519.     DFSetColors -- Set new colors to a gadget.
  2520.  
  2521. SYNOPSIS
  2522.  
  2523.     oldColors=DFSetColors(GadList,gad,newColors)
  2524.                           a0      d0  d1  
  2525.  
  2526.     ULONG DFSetColors(struct gadglist *, UWORD, ULONG);
  2527.  
  2528.  
  2529. FUNCTION
  2530.     This function will set new colors to a gadget in a gadget list. The
  2531.     gadget is the gadget number in the gadgetlist. NewColors is the
  2532.     colorpacket to replace with. See the DFRenderGadgets() for more info on
  2533.     how to pack the colors.
  2534.  
  2535. INPUTS
  2536.     GadList - pointer to a list of gadget structures.
  2537.     gad - gadget number to alter.
  2538.     newColors - new color packet
  2539.  
  2540. RESULTS
  2541.     oldColors - the old color packet
  2542.  
  2543. NOTES
  2544.     The gadget number must be in list or the newcolors can be written to an
  2545.     illegal memory area.
  2546.  
  2547. SEE ALSO
  2548.     DFGetColors(), DFCountGads(), DFRenderGadgets()
  2549.  
  2550.  
  2551. dfunc.library/DFSetDrMd                               dfunc.library/DFSetDrMd
  2552.  
  2553. NAME
  2554.     DFSetDrMd -- Dumy function for graphics.library/SetDrMd().
  2555.  
  2556. SYNOPSIS
  2557.  
  2558.     DFSetDrMd(rastport,mode)
  2559.               a0       d0
  2560.  
  2561.     void DFSetDrMd(struct rastport *, UWORD);
  2562.  
  2563.  
  2564. FUNCTION
  2565.     This function is a dummy function for graphics.library/SetDrMd().
  2566.     It wil set the draw mode for text and graphics in the rastport. Jam 0,
  2567.     jam 1, Inversvide etc. See original function for more information.
  2568.  
  2569. INPUTS
  2570.     rastport - pointer to a (window) rastport
  2571.     mode - draw mode
  2572.  
  2573. SEE ALSO
  2574.     graphics.library/SetDrMd()
  2575.  
  2576.  
  2577. dfunc.library/DFSetFlags                             dfunc.library/DFSetFlags
  2578.  
  2579. NAME
  2580.     DFSetFlags -- Modifies the flags of a gadget in a gadgetlist.
  2581.  
  2582. SYNOPSIS
  2583.  
  2584.     oldFlags=DFSetFlags(GadList,gad,newFlags)
  2585.                         a0      d0  d1
  2586.  
  2587.     ULONG DFSetFlags(struct GadList *, LONG, LONG);
  2588.  
  2589.  
  2590. FUNCTION
  2591.     This function will modify the flags of a gadget in a gadgetlist. Set flags
  2592.     by OR'ing them together.
  2593.  
  2594. INPUTS
  2595.     GadList  - pointer to a gadgetlist
  2596.     gad      - gadget number in list to modify
  2597.     NewFlags - new flag attributes (32 bits)
  2598.  
  2599. RESULTS
  2600.     oldFlags - the previous flag attributes
  2601.  
  2602. BUGS
  2603.     Doesn't return oldFlag attributes yet.
  2604.  
  2605. SEE ALSO
  2606.     DFGetFlags(), DFCountGads()
  2607.  
  2608.  
  2609. dfunc.library/DFSetFont                               dfunc.library/DFSetFont
  2610.  
  2611. NAME
  2612.     DFSetFont -- Sets a font in the rastport.
  2613.  
  2614. SYNOPSIS
  2615.  
  2616.     success=DFSetFont(rastport,textattr,options)
  2617.                       a0       a1       d0   
  2618.  
  2619.     BOOL DFSetFont(struct rastport *, struct fontattr *, UBYTE);
  2620.  
  2621.  
  2622. FUNCTION
  2623.     This function will set a font based on the font attributes to the
  2624.     rastport. The option value defines if the routine shall try to force
  2625.     diskload on the font or not.
  2626.  
  2627. INPUTS
  2628.     rastport - pointer to a (window) rastport
  2629.     textattr - pointer to a fontattr/textattr (see example)
  2630.     options - 0 = try memory first, then diskload
  2631.               1 = force diskload first.
  2632.  
  2633. RESULTS 
  2634.     success - true if success, false if any failure
  2635.  
  2636. EXAMPLE
  2637.  
  2638.     TextAttr:  dc.l  FontName
  2639.                dc.w  8
  2640.                dc.b  0,0
  2641.  
  2642.     FontName:  dc.b  "topaz.font",0
  2643.  
  2644. SEE ALSO
  2645.     graphics.library/OpenFont(), diskfont.library/OpenDiskFont()
  2646.  
  2647.  
  2648. dfunc.library/DFSetGFont                             dfunc.library/DFSetGFont
  2649.  
  2650. NAME
  2651.     DFSetGFont -- init a font for a gadget or replace the old one.
  2652.  
  2653. SYNOPSIS
  2654.  
  2655.     oldFontattr=DFSetGFont(GadList,fontattr,gadget)
  2656.                            a0      a1       d0
  2657.  
  2658.     struct fontattr *DFSetGFont(struct gadlist *, struct fontattr *, UWORD);
  2659.  
  2660.  
  2661. FUNCTION
  2662.     This function will set a font attribute for a gadget which the gadget
  2663.     will use to render its text(s).
  2664.  
  2665. INPUTS
  2666.     GadList - pointer to a list of gadget structures
  2667.     fontattr - pointer to a fon attribute
  2668.     gadget - gadget number in list
  2669.  
  2670. RESULTS 
  2671.     oldFontattr - pointer to the old font attribute or null.
  2672.  
  2673. NOTES
  2674.     Do not give a pointer to the font itself (see example).
  2675.  
  2676. EXAMPLE
  2677.  
  2678.     FontAttr: dc.l  FontName
  2679.               dc.w  8
  2680.               dc.b  0,0
  2681.  
  2682.     FontName: dc.b  "topaz.font",0
  2683.  
  2684. SEE ALSO
  2685.     DFGetGFont(), DFCountGads(), DFSetFont()
  2686.  
  2687.  
  2688. dfunc.library/DFSetID                                   dfunc.library/DFSetID
  2689.  
  2690. NAME
  2691.     DFSetID -- Alter the ID of a gadget.
  2692.  
  2693. SYNOPSIS
  2694.  
  2695.     oldID=DFSetID(GadList,gadget,newID)
  2696.                   a0      d0     d1
  2697.  
  2698.     LONG DFSetID(struct gadlist *, UWORD, LONG);
  2699.  
  2700.  
  2701. FUNCTION
  2702.     This function will set or alter the ID of a gadget.
  2703.  
  2704. INPUTS
  2705.     GadList - pointer to a list of gadget structures.
  2706.     gadget - gadget number
  2707.     newID - new ID
  2708.  
  2709. RESULTS 
  2710.     oldID - the old ID or null.
  2711.  
  2712. NOTES
  2713.     Gadget number is not the same as gadget ID.
  2714.  
  2715. SEE ALSO
  2716.     DFGetID(), DFFindID(), DFCountGads()
  2717.  
  2718.  
  2719. dfunc.library/DFSetImage                             dfunc.library/DFSetImage
  2720.  
  2721. NAME
  2722.     DFSetImage -- Set a image to a gadget or replaces it.
  2723.  
  2724. SYNOPSIS
  2725.  
  2726.     oldImage=DFSetImage(GadList,newImage,gadget,no)
  2727.                         a0      a1       d0     d1
  2728.  
  2729.     struct image *DFSetImage(struct gadlist *,struct image *,UWORD, UBYTE);
  2730.  
  2731.  
  2732. FUNCTION
  2733.     This function will set an image to a gadget or replace an old one. The no
  2734.     field defines which of the gadget you want to replace. If you want to set
  2735.     the lower (pressed) field of the gadget you can also set image to be -1.
  2736.     This will tell the render routine not to render any gadget when gadget is
  2737.     pressed.
  2738.  
  2739. INPUTS
  2740.     GadList - pointer to a list of gadget structures
  2741.     newImage - pointer to an image structure (if no=1 then optional -1)
  2742.     gadget - gadget number in list
  2743.     no - upper or lower image field (0 or 1)
  2744.  
  2745. RESULTS 
  2746.     oldImage - pointer to the old image or null (or -1 if no=1)
  2747.  
  2748. NOTES
  2749.     The lowerfield image can be turned of by setting it to -1 instead of a
  2750.     pointer to a newImage. Consider therefor that you can also have returned
  2751.     -1 instead of a pointer or null.
  2752.  
  2753. SEE ALSO
  2754.     DFGetImage(), DFCountGads()
  2755.  
  2756.  
  2757. dfunc.library/DFSetPattern                         dfunc.library/DFSetPattern
  2758.  
  2759. NAME
  2760.     DFSetPattern -- 
  2761.  
  2762. SYNOPSIS
  2763.  
  2764.     oldPattern=DFSetPattern(rastport,pattern,size)
  2765.                             a0       a1      d0
  2766.  
  2767.     UWORD DFSetPattern(struct rastport *, APTR, UWORD);
  2768.  
  2769.  
  2770. FUNCTION
  2771.     This function will set a draw pattern in rastport. You will notice the
  2772.     effect on boxfills etc. Set the bitpattern in a table. Normally you only
  2773.     need to words and a size of 2 to make "ghosting" pattern.
  2774.  
  2775. INPUTS
  2776.     rastport - pointer to a rastport
  2777.     pattern - pointer to pattern table
  2778.     size - size of pattern table
  2779.  
  2780. RESULTS
  2781.     oldPattern - pointer to the old pattern
  2782.  
  2783. BUGS
  2784.     Not quite sure if this is right thow.
  2785.  
  2786. SEE ALSO
  2787.     DClrPattern()
  2788.  
  2789.  
  2790. dfunc.library/DFSetPen                                 dfunc.library/DFSetPen
  2791.  
  2792. NAME
  2793.     DFSetPen -- Dummy for graphics.library/SetAPen().
  2794.  
  2795. SYNOPSIS
  2796.  
  2797.     DFSetPen(rastport,pen)
  2798.              a0       d0
  2799.  
  2800.     void DFSetPen(struct rastport *, UBYTE);
  2801.  
  2802.  
  2803. FUNCTION
  2804.     This function is a dummy function for graphics.library/SetAPen(). It will
  2805.     set the drawing pen color in rastport. See original function for more
  2806.     information.
  2807.  
  2808. INPUTS
  2809.     rastport - pointer to a (window) rastport
  2810.     pen - pen number (palette number)
  2811.  
  2812.  
  2813. SEE ALSO
  2814.     DFSetBPen(), graphics.library/SetAPen()
  2815.  
  2816.  
  2817. dfunc.library/DFSetTitle                             dfunc.library/DFSetTitle
  2818.  
  2819. NAME
  2820.     DFSetTitle -- Set new or replace title in a gadget.
  2821.  
  2822. SYNOPSIS
  2823.  
  2824.     oldTitle=DFSetTitle(GadList,title,gadget,no)
  2825.                         a0      a1    d0:16  d1:8
  2826.  
  2827.     STRPTR DFSetTitle(struct gadlist *, STRPTR, UWORD, UBYTE);
  2828.  
  2829.  
  2830. FUNCTION
  2831.     This function will replace or set a new title to a gadget. The no defines
  2832.     which gadget text to be set. 0 = main text, 1 = text when gadget is
  2833.     pressed. You can set text even if the gadget has no text originally.
  2834.  
  2835. INPUTS
  2836.     GadList - pointer to a list of gadget structures
  2837.     title - pointer to a null terminated string
  2838.     gadget - gadget number in list
  2839.     no - upper or lower gadgettext
  2840.  
  2841. RESULTS 
  2842.     oldTitle - pointer to the old gadget text
  2843.  
  2844. SEE ALSO
  2845.     DFGetTitle(), DFCountGads()
  2846.  
  2847.  
  2848. dfunc.library/DFStripBool                           dfunc.library/DFStripBool
  2849.  
  2850. NAME
  2851.     DFStripBool -- Will strip longword bool made by DFMakeBool().
  2852.  
  2853. SYNOPSIS
  2854.  
  2855.     values=DFStripBool(bool)
  2856.     d0:d1              d0
  2857.  
  2858.     values DFStripBool(ULONG);
  2859.     d0:d1
  2860.  
  2861.  
  2862. FUNCTION
  2863.     This function will strip a packet longword to two values. The result will
  2864.     be returned in both d0 and d1 both in word size. The upper 16 bits will be
  2865.     returned in d1 and the lower 16 bits in d0.
  2866.  
  2867. INPUTS
  2868.     bool - a longword packet by DFMakeBool()
  2869.  
  2870. RESULTS 
  2871.     values - d0 = lower 16 bits
  2872.              d1 = upper 16 bits
  2873.  
  2874. SEE ALSO
  2875.     DFMakeBool()
  2876.  
  2877.  
  2878. dfunc.library/DFStripText                           dfunc.library/DFStripText
  2879.  
  2880. NAME
  2881.     DFStripText -- Strips a text buffer for comments and whitespace.
  2882.  
  2883. SYNOPSIS
  2884.  
  2885.     length=DFStripText(scrBuff,dstBuff,mode)
  2886.                        a0      a1      d0:8
  2887.  
  2888.     ULONG DFStripText(APTR, APTR, UBYTE);
  2889.  
  2890.  
  2891. FUNCTION
  2892.     This function will strip a terminated buffer for comments and whitespace.
  2893.     It can handle five types of comments:
  2894.  
  2895.     /* comment 1 */
  2896.     // comment 2 //
  2897.     ; comment 3
  2898.     * comment 4 (only as the first sign on a line if mode=1)
  2899.     ## comment 5
  2900.  
  2901.     It goes thrue several passes: in first pass it will remove all comments.
  2902.     In second pass it will remove all double+ linefeeds. In the third pass it
  2903.     will remove all white space at beginning of each line. In the fourth pass
  2904.     it will remove all empty lines (spaces/tabs). In the fifth pass it check
  2905.     which mode is set, if mode=2 then check for special assembler comments.
  2906.     In the sixth pass it will remove all whitespaces at the end of each line.
  2907.  
  2908.     Still this routine is very fast indeed!
  2909.  
  2910. INPUTS
  2911.     scrBuff - pointer to a null terminated buffer with ascii text.
  2912.     dstBuff - pointer to destination buffer to put stipped text.
  2913.     mode - 0 = All comments (not special assembler comments)
  2914.            1 = Assembler mode
  2915.                It will not remove comments which starts with an asterix and
  2916.                are not the first sign on the line. F.eks:
  2917.                * comment       - will be removed
  2918.                move.w #2*4     - will not be removed
  2919.                hello * comment - will not be removed
  2920.            2 = Advanced assembler mode
  2921.                This mode will remove all comments pluss comments for assembler
  2922.                sources which does not begin with a comment sign. For example:
  2923.                move.l d0,d1   ;comment  - will be removed
  2924.                move.l d0,d1   comment   - will be removed
  2925.            3 = C mode. Will only remove /*..*/ and //..// pairs.
  2926.  
  2927. RESULTS 
  2928.     length - length of stripped buffer
  2929.  
  2930. NOTE
  2931.     The routine will only accept the * as a comment if the asterix is the
  2932.     first sign on the line. The astrix sign is often used in assembler code
  2933.     and if it will stripp it wrong if any thing else is allowed.
  2934.  
  2935. SEE ALSO
  2936.  
  2937.  
  2938. dfunc.library/DFToggle                                 dfunc.library/DFToggle
  2939.  
  2940. NAME
  2941.     DFToggle -- Toggles a gadget pressed or unpressed.
  2942.  
  2943. SYNOPSIS
  2944.  
  2945.     prevState=DFToggle(Rastport,GadList,gadget)
  2946.                        a0       a1      d0
  2947.  
  2948.     BOOL DFToggle(struct rasport *, struct gadlist *, UWORD);
  2949.  
  2950.  
  2951. FUNCTION
  2952.     This function will toggle a togglable gadget. It will return false if
  2953.     gadget was previously unpressed or true if gadge was pressed.
  2954.  
  2955. INPUTS
  2956.     Rastport - pointer to the window rastport the gadgets are using
  2957.     GadList - pointer to the gadgetlist
  2958.     gadget - gadget (number) to toggle
  2959.  
  2960. RESULTS 
  2961.     prevState - previous toggle state (bool)
  2962.  
  2963. SEE ALSO
  2964.     DFGetToggle(), DFRenderGadgets()
  2965.  
  2966.  
  2967. dfunc.library/DFUpdateGad                           dfunc.library/DFUpdateGad
  2968.  
  2969. NAME
  2970.     DFUpdateGad -- Redraws a gadget.
  2971.  
  2972. SYNOPSIS
  2973.  
  2974.     DFUpdateGad(rastport,GadList,gadget)
  2975.                 a0       a1      d0
  2976.  
  2977.     void DFUpdateGad(struct rastport *, struct gadlist *, UWORD);
  2978.  
  2979.  
  2980. FUNCTION
  2981.     This function will redraw a gadget in a gadget list. Use the same
  2982.     rastport for this function as for the rest of the gadgetlist.
  2983.  
  2984. INPUTS
  2985.     rastport - pointer to a (window) rastport
  2986.     GadList - pointer to a gadgetlist
  2987.     gadget - gadget number to update
  2988.  
  2989.  
  2990. SEE ALSO
  2991.     DFRenderGadgets(), DFToggle(), FindID()
  2992.  
  2993.  
  2994. dfunc.library/DFUpperCase                           dfunc.library/DFUpperCase
  2995.  
  2996. NAME
  2997.     DFUpperCase -- Will make letters in buffer uppercase.
  2998.  
  2999. SYNOPSIS
  3000.  
  3001.     DFUpperCase(buffer,size)
  3002.                  a0     d0
  3003.  
  3004.     void DFUpperCase(APTR, ULONG);
  3005.  
  3006.  
  3007. FUNCTION
  3008.     This function will make all letters in the buffer uppercase. It will only
  3009.     handle valid ascii characters from a-z (+foreign special chars like
  3010.     æ, ø, å). The size can be 1.
  3011.  
  3012. INPUTS
  3013.     buffer - pointer to start address
  3014.     size - size of buffer to convert
  3015.  
  3016. SEE ALSO
  3017.     DFLowerCase()
  3018.  
  3019.  
  3020. dfunc.library/DFUserPort                             dfunc.library/DFUserPort
  3021.  
  3022. NAME
  3023.     DFUserPort -- Returns the pointer to the userport of window.
  3024.  
  3025. SYNOPSIS
  3026.  
  3027.     userport=DFUserPort(window)
  3028.                         a0
  3029.  
  3030.     struct msgport *DFUserPort(struct window *);
  3031.  
  3032.  
  3033. FUNCTION
  3034.     This function will return a pointer to the userport of the window. If the
  3035.     IDCMP flags are not set, the result will be NULL. Use this returned
  3036.     address with the WaitPort(), GetMsg(), ReplyMsg() functions of the
  3037.     exec.library or the DFWaitGad() function in this library.
  3038.  
  3039. INPUTS
  3040.     window - pointer to a window
  3041.  
  3042. RESULTS 
  3043.     userport - pointer to the userport (IDCMP port)
  3044.  
  3045. SEE ALSO
  3046.     DFWaitgad()
  3047.  
  3048.  
  3049. dfunc.library/DFViewport                             dfunc.library/DFViewport
  3050.  
  3051. NAME
  3052.     DFViewport -- Returns pointer to a viewport structure.
  3053.  
  3054. SYNOPSIS
  3055.  
  3056.     viewport=DFViewport(screen)
  3057.                         a0
  3058.  
  3059.     struct viewport *DFViewport(struct screen *);
  3060.  
  3061.  
  3062. FUNCTION
  3063.     This function will return the viewport address of the screen.
  3064.  
  3065. INPUTS
  3066.     screen - pointer to a screen
  3067.  
  3068. RESULTS 
  3069.     viewport - pointer to viewport of screen
  3070.  
  3071. SEE ALSO
  3072.     DFBitmap()
  3073.  
  3074.  
  3075. dfunc.library/DFWaitGad                               dfunc.library/DFWaitGad
  3076.  
  3077. NAME
  3078.     DFWaitGad -- Do a waitport and parse input activity.
  3079.  
  3080. SYNOPSIS
  3081.  
  3082.     GadNum=DFWaitGad(Rastport, port, gadgetList)
  3083.       d0             a0        a1    a1
  3084.  
  3085.     message=DFWaitGad(Rastport, port, gadgetList)
  3086.       a0              a0        a1    a1
  3087.  
  3088.  
  3089.     LONG DFWaitGad(struct rastport *, struct msgport *, APTR);
  3090.           d0
  3091.  
  3092.     struct message *DFWaitGad(struct rastport *, struct msgport *, APTR);
  3093.           a0
  3094.  
  3095.  
  3096. FUNCTION
  3097.     This function do a WaitPort(), GetMsg() and ReplyMsg() and parsing the
  3098.     gadgetlist to return gadget number pressed if any. This function returns
  3099.     also standard pointer to a message structure in A0 so you can read the
  3100.     message as usual.
  3101.  
  3102. INPUTS
  3103.     Rastport   - pointer to a valid rastport structure
  3104.     Port       - pointer to a valid message port (like eg. the UserPort)
  3105.     gadgetList - pointer to a terminated gadgetlist of DFGadget strutures.
  3106.  
  3107. RESULTS
  3108.     d0 - will return gadget pressed or NULL
  3109.     a0 - will return pointer to a message in any situation
  3110.  
  3111. NOTES
  3112.     DO NOT Reply() message in A0!! This will mostly crash the system. The
  3113.     message you get is a copy of the original message which is already
  3114.     replied when you get it.
  3115.  
  3116. SEE ALSO
  3117.     DFRenderGadgets(), DFUserPort()
  3118.  
  3119.  
  3120. dfunc.library/DFWaitMsg                               dfunc.library/DFWaitMsg
  3121.  
  3122. NAME
  3123.     DFWaitMsg -- Watches a message port.
  3124.  
  3125. SYNOPSIS
  3126.  
  3127.     message=DFWaitMsg(port)
  3128.                       a0
  3129.  
  3130.     struct message *DFWaitMsg(struct msgport *);
  3131.  
  3132.  
  3133. FUNCTION
  3134.     This function will do a WaitPort(), GetMsg(), ReplyMsg(). It will not
  3135.     parse any DFGadgets. This function helps you in handling messages.
  3136.  
  3137. INPUTS
  3138.     port - pointer to a valid message port structure (eg. UserPort)
  3139.  
  3140. RESULTS
  3141.     message - pointer to a message structure
  3142.  
  3143. NOTES
  3144.     DO NOT ReplyMsg() the message returned in d0. The message you get is
  3145.     a copy and is already replied when you get it!
  3146.  
  3147. SEE ALSO
  3148.     exec.library/WaitPort(), exec.library/GetMsg(), exec.library/ReplyMsg()
  3149.  
  3150.  
  3151. dfunc.library/DFWindowRastport                 dfunc.library/DFWindowRastport
  3152.  
  3153. NAME
  3154.     DFWindowRastport -- Returns the rastport address of a window.
  3155.  
  3156. SYNOPSIS
  3157.  
  3158.     rastport=DFWindowRastport(Window)
  3159.                      a0
  3160.  
  3161.     struct rastport *DFWindowRastport(struct window *);
  3162.  
  3163.  
  3164. FUNCTION
  3165.     This function will return the address to th rastport of the window.
  3166.     It's really a dummy routine.
  3167.  
  3168. INPUTS
  3169.     Window - pointer to a window
  3170.  
  3171. RESULTS
  3172.     rastport - pointer to a rastport structure
  3173.  
  3174. SEE ALSO
  3175.     DFScreenRastport()
  3176.  
  3177.  
  3178. dfunc.library/DFWriteStd                             dfunc.library/DFWriteStd
  3179.  
  3180. NAME
  3181.     DFWriteStd -- Writes a string to current output stream.
  3182.  
  3183. SYNOPSIS
  3184.  
  3185.     DFWriteStd(string)
  3186.                 a0 
  3187.  
  3188.     void DFWriteStd(STRPTR);
  3189.  
  3190.  
  3191. FUNCTION
  3192.     This function will try to write a null terminated to the default output.
  3193.     If no such output handler is found or the length of the string is null the
  3194.     routine will skip writing which makes this routine safe.
  3195.     If you start your program from eg. CLI, the default output will be the cli
  3196.     window or the redirection.
  3197.  
  3198. INPUTS
  3199.     string - pointer to a null terminated string. Can contain ansi sequences
  3200.              and linfeeds etc.
  3201.  
  3202. SEE ALSO
  3203.     dos.library/Output(), dos.library/Write()
  3204.  
  3205. *---------------------------------------------------------------------------*
  3206. ##base _DFuncBase
  3207. ##bias 30
  3208. ##public
  3209. *
  3210. *  FD version 37.13 (31.10.95)
  3211. *
  3212. *  Gadget and port functions:
  3213. *
  3214. ##private
  3215. DFCreateGadList(ListTags) (a0)
  3216. DFFreeGadList(GadListBase) (a0)
  3217. DFGadgetDesigner(Window,filename) (a0,d0)
  3218. ##public
  3219. DFRenderGadgets(RastPort,GadList) (a0/a1)
  3220. DFWaitGad(RastPort,Port,GadBase) (a0/a1/a2)
  3221. DFWaitMsg(Port) (a0)
  3222. DFClrPort(Port) (a0)
  3223. *
  3224. *  Scale functions for gadgets:
  3225. *
  3226. DFInitScale(Window,GadList) (a0/a1)
  3227. DFScaleGads(scalebody) (d0)
  3228. DFRemScale(scalebody) (d0)
  3229. *
  3230. *  Gadget info:
  3231. *
  3232. DFGetFlags(GadList,gad) (a0,d0)
  3233. DFSetFlags(GadList,gad,newFlags) (a0,d0/d1)
  3234. DFGetColors(GadList,gad) (a0,d0)
  3235. DFSetColors(GadList,gad,colors) (a0,d0/d1)
  3236. DFGetTitle(GadList,gad,no) (a0,d0/d1)
  3237. DFSetTitle(GadL,title,gad,no) (a0/a1,d0/d1)
  3238. DFGetImage(GadList,gad,no) (a0,d0/d1)
  3239. DFSetImage(GadL,Image,gad,no) (a0/a1,d0/d1)
  3240. DFGetGFont(GadList,gad) (a0,d0)
  3241. DFSetGFont(GadList,font,gad) (a0/a1,d0)
  3242. DFGetID(GadList,gad) (a1,d0)
  3243. DFSetID(GadList,gad,newID) (a0,d0/d1)
  3244. DFFindID(GadList,ID) (a0,d0)
  3245. DFToggle(Rastport,GadList,gad) (a0/a1,d0)
  3246. DFGetToggle(GadList,gad) (a0,d0)
  3247. DFCountGads(GadList) (a0)
  3248. DFUpdateGad(Rastport,GadL,gad) (a0/a1,d0)
  3249. *
  3250. *  Graphics:
  3251. *
  3252. DFSetPen(Rastport,pen) (a0,d0)
  3253. DFSetBPen(Rastport,pen) (a0,d0)
  3254. DFSetDrMd(Rastport,mode) (a0,d0)
  3255. DFSetFont(Rastport,TextAtt,opt) (a0/a1,d0)
  3256. DFClrRast(RastPort,yPos,mode) (a0,d0/d1)
  3257. DFFillWindow(Window,mode) (a0,d0)
  3258. DFLine(Rast,x1,y1,x2,y2) (a0,d0/d1/d2/d3)
  3259. DFBox(Rastport,x1,y1,x2,y2) (a0,d0/d1/d2/d3)
  3260. DFDrawI(Rast,Image,x,y) (a0/a1,d0/d1)
  3261. DFBeavel(Rast,x,y,w,h,cols) (a0,d0/d1/d2/d3/d4)
  3262. ##private
  3263. DFLoadIFF(Bitmap,filename) (a0/a1)
  3264. ##public
  3265. DFSaveIFF(Screen,filename,mode) (a0/a1,d0)
  3266. DFLoadRGB4(screen,colors,no) (a0/a1,d0)
  3267. DFSetPattern(Rast,pattern,size) (a0/a1,d0)
  3268. DFClrPattern(Rastport) (a0)
  3269. *
  3270. *  Text:
  3271. *
  3272. ##private
  3273. DFPrintText()()
  3274. ##public
  3275. DFPrintTxt2(Rastport,text,x,y) (a0/a1,d0/d1)
  3276. DFWriteStd(Text) (a0)
  3277. DFPrintF(ras,str,ins,buf,x,y) (a0/a1/a2/a3,d0/d1)
  3278. DFSearch(Buffer,String,BuffSz) (a0/a1,d0)
  3279. DFUpperCase(Buffer,length) (a0,d0)
  3280. DFLowerCase(Buffer,length) (a0,d0)
  3281. DFMakeASCII(Buffer,length,mode) (a0,d0/d1)
  3282. DFFindStrLen(String) (a0)
  3283. DFCopyString(srcStr,dstStr) (a0/a1)
  3284. *
  3285. *  Dos:
  3286. *
  3287. DFGetFileLength(file) (a0)
  3288. DFLoadFile(file) (a0) ;[d1=length]
  3289. DFRemFile(filebuffer) (a0)
  3290. DFDeleteFile(file) (a0)
  3291. DFSaveBuffer(file,buffer,size) (a0/a1,d0)
  3292. *
  3293. *  Intuition:
  3294. *
  3295. ##private
  3296. DFOpenXWindow(XWindowStruct) (a0)
  3297. DFCloseXWindow(XWindow) (a0)
  3298. ReservedFunctionSlot1() ()
  3299. DFRefreshXFrame(XWindow) (a0)
  3300. ##public
  3301. DFWindowRastport(window) (a0)
  3302. DFScreenRastport(screen) (a0)
  3303. DFScreenOfWindow(window) (a0)
  3304. DFViewport(screen) (a0)
  3305. DFBitmap(screen) (a0)
  3306. ##private
  3307. DFFindScreen(title) (a0)
  3308. DFFindWindow(title) (a0)
  3309. DFPointerOff(window) (a0)
  3310. DFPointerOn(window,pointer) (a0/a1)
  3311. DFMakeRastport(buffer,w,h,d) (a0,d0/d1/d2)
  3312. DFRemRastport(rastport) (a0)
  3313. ##public
  3314. DFAllocBitmap(w,h,d) (d0/d1/d2)
  3315. DFFreeBitmap(bitmap) (a0)
  3316. *
  3317. *  Misc:
  3318. *
  3319. DFGraphicsBase() ()
  3320. DFDosBase() ()
  3321. DFIntuitionBase() ()
  3322. DFUserport(window) (a0)
  3323. DFMakeBool(value1,value2) (d0/d1)
  3324. DFStripBool(bool) (d0)
  3325. DFDisable() ()
  3326. DFEnable() ()
  3327. *
  3328. *  Tasks:
  3329. *
  3330. DFNewProcess(code,name) (a0/a1)
  3331. DFFindTask(taskname) (a0)
  3332. DFRenameTask(task,newName) (a0/a1)
  3333. *
  3334. *  Memory:
  3335. *
  3336. DFAllocVMem(size,type) (d0/d1)
  3337. DFFreeVMem(memory) (a0)
  3338. DFGetVMemSize(memory) (a0)
  3339. DFClrCache() ()
  3340. *
  3341. *  Printer:
  3342. *
  3343. DFPrinterComand(command) (d0)
  3344. DFPrinterText(text) (a0)
  3345. DFPrinterWindow(window,printStruct) (a0/a1)
  3346. *
  3347. *  Sound:
  3348. *
  3349. ##private
  3350. DFDrawSample(sampleStruct) (a0)
  3351. DFInitModule(module) (a0)
  3352. DFStartModule() ()
  3353. DFStopModule() ()
  3354. DFRemModule(modBase) (a0)
  3355. *
  3356. *  Misc:
  3357. *
  3358. DFCalcColormap() ()
  3359. ##public
  3360. DFDeltaList(GadList,x,y) (a0,d0/d1)
  3361. ##private
  3362. DFAllocList(List) (a0)
  3363. DFFreeList(ListHdr) (a0)
  3364. ##public
  3365. DFCalcArg(string) (a0)
  3366. DFReadArg(string,destBuffer) (a0/a1)
  3367. DFStripText(scrBuff,dstBuff) (a0/a1)
  3368. DFNewPrintText(window,text,x ,y ,mode)(a0/a1,d0/d1/d2)
  3369. DFGhostGads(gadgets,mode)(a0,d0)
  3370. DFGetProc()()
  3371. DFGetMath()()
  3372. DFReverseBuffer(buffer,length)(a0,d0)
  3373. DFCompareStr(string1,string2,mode)(a0/a1,d0)
  3374. ##end
  3375.